Skip to content

Commit 0143ad6

Browse files
committed
genPOI: code style fixes
E129 can suck me off. Get a better syntax, Python.
1 parent 2b550fd commit 0143ad6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

overviewer_core/aux_files/genPOI.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def parseBucketChunks(task_tuple):
150150
i = 0
151151
cnt = 250 + cnt
152152
logging.debug("Found %d markers in thread %d so far at %d chunks.",
153-
sum(len(v) for v in markers.values()), pid, cnt)
153+
sum(len(v) for v in markers.values()), pid, cnt)
154154

155155
return markers
156156

@@ -286,7 +286,9 @@ def get_name_from_uuid(self):
286286
pass
287287

288288
try:
289-
profile = json.loads(urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8"))
289+
profile = json.loads(
290+
urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8")
291+
)
290292
if 'name' in profile:
291293
profile['retrievedAt'] = time.mktime(time.localtime())
292294
PlayerDict.uuid_cache[sname] = profile
@@ -437,8 +439,8 @@ def create_marker_from_filter_result(poi, result):
437439
d["createInfoWindow"] = result['createInfoWindow']
438440

439441
# Polylines and polygons
440-
if ('polyline' in result and hasattr(result['polyline'], '__iter__')) or \
441-
'polygon' in result and hasattr(result['polygon'], '__iter__'):
442+
if (('polyline' in result and hasattr(result['polyline'], '__iter__')) or
443+
'polygon' in result and hasattr(result['polygon'], '__iter__')):
442444
# If the points form a line or closed shape
443445
d['isLine'] = 'polyline' in result
444446
# Collect points
@@ -455,7 +457,7 @@ def create_marker_from_filter_result(poi, result):
455457
if 'fill' in result:
456458
d['fill'] = result['fill']
457459
else:
458-
d['fill'] = not d['isLine'] # fill polygons by default
460+
d['fill'] = not d['isLine'] # fill polygons by default
459461

460462
if 'weight' in result:
461463
d['strokeWeight'] = result['weight']
@@ -573,13 +575,13 @@ def main():
573575
markers = dict((name, dict(created=False, raw=[], name=filter_name))
574576
for name, filter_name, __, __, __, __ in filters)
575577

576-
all_rsets = set(map(lambda f : f[3], filters))
578+
all_rsets = set(map(lambda f: f[3], filters))
577579
logging.info("Will search %s region sets using %s filters", len(all_rsets), len(filters))
578580

579581
# apply filters to regionsets
580582
if not args.skipscan:
581583
for rset in all_rsets:
582-
rset_filters = list(filter(lambda f : f[3] == rset, filters))
584+
rset_filters = list(filter(lambda f: f[3] == rset, filters))
583585
logging.info("Calling handleEntities for %s with %s filters", rset, len(rset_filters))
584586
handleEntities(rset, config, args.config, rset_filters, markers)
585587

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pycodestyle]
22
max_line_length = 100
3-
ignore = E221,E222,E241,E741,W503,W504
3+
ignore = E129,E221,E222,E241,E741,W503,W504
44
statistics = True
55
[isort]
66
line_length = 100

0 commit comments

Comments
 (0)