Skip to content

Commit 4575967

Browse files
author
Martin Journois
committed
PEP8ing, fearing the 👻
1 parent 36514c2 commit 4575967

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

folium/features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def _get_self_bounds(self):
637637
"""Computes the bounds of the object itself (not including it's children)
638638
in the form [[lat_min, lon_min], [lat_max, lon_max]]
639639
"""
640-
bounds = [[None,None],[None,None]]
640+
bounds = [[None, None], [None, None]]
641641
for point in iter_points(self.data):
642642
bounds = [
643643
[
@@ -701,7 +701,7 @@ def _get_self_bounds(self):
701701
"""Computes the bounds of the object itself (not including it's children)
702702
in the form [[lat_min, lon_min], [lat_max, lon_max]]
703703
"""
704-
bounds = [[None,None],[None,None]]
704+
bounds = [[None, None], [None, None]]
705705
for point in iter_points(self.data):
706706
bounds = [
707707
[

folium/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def _get_self_bounds(self):
421421
"""Computes the bounds of the object itself (not including it's children)
422422
in the form [[lat_min, lon_min], [lat_max, lon_max]]
423423
"""
424-
return [[self.location[0],self.location[1]],[self.location[0],self.location[1]]]
424+
return [[self.location[0], self.location[1]], [self.location[0], self.location[1]]]
425425

426426
class Popup(Element):
427427
def __init__(self, html=None, max_width=300):

folium/utilities.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ def iter_points(x):
449449
"""Iterates over a list representing a feature, and returns a list of points,
450450
whatever the shape of the array (Point, MultiPolyline, etc).
451451
"""
452-
if isinstance(x,list):
452+
if isinstance(x, list):
453453
if len(x):
454-
if isinstance(x[0],list):
454+
if isinstance(x[0], list):
455455
out = []
456456
for y in x:
457457
out += iter_points(y)
@@ -461,4 +461,4 @@ def iter_points(x):
461461
else:
462462
return []
463463
else:
464-
raise ValueError('List type expected {!r}'.format(x))
464+
raise ValueError('List type expected. Got {!r}.'.format(x))

0 commit comments

Comments
 (0)