genPOI: code style fixes

E129 can suck me off. Get a better syntax, Python.
This commit is contained in:
Nicolas F 2020-06-25 18:36:00 +02:00
parent 2b550fdf66
commit 0143ad63a6
2 changed files with 10 additions and 8 deletions

View File

@ -286,7 +286,9 @@ class PlayerDict(dict):
pass
try:
profile = json.loads(urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8"))
profile = json.loads(
urllib.request.urlopen(UUID_LOOKUP_URL + sname).read().decode("utf-8")
)
if 'name' in profile:
profile['retrievedAt'] = time.mktime(time.localtime())
PlayerDict.uuid_cache[sname] = profile
@ -437,8 +439,8 @@ def create_marker_from_filter_result(poi, result):
d["createInfoWindow"] = result['createInfoWindow']
# Polylines and polygons
if ('polyline' in result and hasattr(result['polyline'], '__iter__')) or \
'polygon' in result and hasattr(result['polygon'], '__iter__'):
if (('polyline' in result and hasattr(result['polyline'], '__iter__')) or
'polygon' in result and hasattr(result['polygon'], '__iter__')):
# If the points form a line or closed shape
d['isLine'] = 'polyline' in result
# Collect points

View File

@ -1,6 +1,6 @@
[pycodestyle]
max_line_length = 100
ignore = E221,E222,E241,E741,W503,W504
ignore = E129,E221,E222,E241,E741,W503,W504
statistics = True
[isort]
line_length = 100