@@ -39,7 +39,8 @@ class WmsTileLayer(Layer):
3939 version : str, default '1.1.1'
4040 Version of the WMS service to use.
4141 attr : str, default None
42- The attribution of the service. Will be displayed in the bottom right corner.
42+ The attribution of the service.
43+ Will be displayed in the bottom right corner.
4344 overlay : bool, default False
4445 Adds the layer as an optional overlay (True) or the base layer (False).
4546 control : bool, default True
@@ -52,7 +53,7 @@ class WmsTileLayer(Layer):
5253 def __init__ (self , url , name = None , layers = None , styles = None , format = None ,
5354 transparent = True , version = '1.1.1' , attr = None , overlay = True ,
5455 control = True ):
55- super (WmsTileLayer , self ).__init__ (overlay = overlay , control = control , name = name )
56+ super (WmsTileLayer , self ).__init__ (overlay = overlay , control = control , name = name ) # noqa
5657 self .url = url
5758 self .attribution = attr if attr is not None else ''
5859 # Options.
@@ -169,8 +170,8 @@ class Vega(Element):
169170 ----------
170171 data: JSON-like str or object
171172 The Vega description of the chart.
172- It can also ba any object that has a method `to_json`, so that you can (for instance)
173- provide a `vincent` chart.
173+ It can also be any object that has a method `to_json`,
174+ so that you can (for instance) provide a `vincent` chart.
174175 width: int or str, default None
175176 The width of the output element.
176177 If None, either data['width'] (if available) or '100%' will be used.
@@ -180,11 +181,11 @@ class Vega(Element):
180181 If None, either data['width'] (if available) or '100%' will be used.
181182 Ex: 120, '120px', '80%'
182183 left: int or str, default '0%'
183- The horizontal distance of the output with respect to the parent HTML object.
184- Ex: 120, '120px', '80%'
184+ The horizontal distance of the output with respect to the parent
185+ HTML object. Ex: 120, '120px', '80%'
185186 top: int or str, default '0%'
186- The vertical distance of the output with respect to the parent HTML object.
187- Ex: 120, '120px', '80%'
187+ The vertical distance of the output with respect to the parent
188+ HTML object. Ex: 120, '120px', '80%'
188189 position: str, default 'relative'
189190 The `position` argument that the CSS shall contain.
190191 Ex: 'relative', 'absolute'
@@ -290,8 +291,10 @@ class GeoJson(Layer):
290291 ... '#00ff00'}
291292 >>> GeoJson(geojson, style_function=style_function)
292293 """
293- def __init__ (self , data , style_function = None , name = None , overlay = True , control = True ):
294- super (GeoJson , self ).__init__ (name = name , overlay = overlay , control = control )
294+ def __init__ (self , data , style_function = None , name = None ,
295+ overlay = True , control = True ):
296+ super (GeoJson , self ).__init__ (name = name , overlay = overlay ,
297+ control = control )
295298 self ._name = 'GeoJson'
296299 if hasattr (data , 'read' ):
297300 self .embed = True
@@ -321,7 +324,8 @@ def __init__(self, data, style_function=None, name=None, overlay=True, control=T
321324 raise ValueError ('Unhandled object {!r}.' .format (data ))
322325
323326 if style_function is None :
324- def style_function (x ): return {}
327+ def style_function (x ):
328+ return {}
325329 self .style_function = style_function
326330
327331 self ._template = Template (u"""
@@ -334,8 +338,10 @@ def style_function(x): return {}
334338 """ ) # noqa
335339
336340 def style_data (self ):
337- """Applies self.style_function to each feature of self.data and returns a corresponding
338- JSON output.
341+ """
342+ Applies `self.style_function` to each feature of `self.data` and
343+ returns a corresponding JSON output.
344+
339345 """
340346 if 'features' not in self .data .keys ():
341347 # Catch case when GeoJSON is just a single Feature or a geometry.
@@ -421,7 +427,8 @@ class TopoJson(Layer):
421427 """
422428 def __init__ (self , data , object_path , style_function = None ,
423429 name = None , overlay = True , control = True ):
424- super (TopoJson , self ).__init__ (name = name , overlay = overlay , control = control )
430+ super (TopoJson , self ).__init__ (name = name , overlay = overlay ,
431+ control = control )
425432 self ._name = 'TopoJson'
426433 if 'read' in dir (data ):
427434 self .embed = True
@@ -436,7 +443,8 @@ def __init__(self, data, object_path, style_function=None,
436443 self .object_path = object_path
437444
438445 if style_function is None :
439- def style_function (x ): return {}
446+ def style_function (x ):
447+ return {}
440448 self .style_function = style_function
441449
442450 self ._template = Template (u"""
@@ -452,8 +460,10 @@ def style_function(x): return {}
452460 """ ) # noqa
453461
454462 def style_data (self ):
455- """Applies self.style_function to each feature of self.data and returns a corresponding
456- JSON output.
463+ """
464+ Applies self.style_function to each feature of self.data and returns
465+ a corresponding JSON output.
466+
457467 """
458468 def recursive_get (data , keys ):
459469 if len (keys ):
@@ -522,7 +532,8 @@ class MarkerCluster(Layer):
522532 Whether the Layer will be included in LayerControls
523533 """
524534 def __init__ (self , name = None , overlay = True , control = True ):
525- super (MarkerCluster , self ).__init__ (name = name , overlay = overlay , control = control )
535+ super (MarkerCluster , self ).__init__ (name = name , overlay = overlay ,
536+ control = control )
526537 self ._name = 'MarkerCluster'
527538 self ._template = Template (u"""
528539 {% macro script(this, kwargs) %}
@@ -652,8 +663,11 @@ def __init__(self, location, radius=500, color='black',
652663
653664
654665class LatLngPopup (MacroElement ):
655- """When one clicks on a Map that contains a LatLngPopup, a popup is shown that displays
656- the latitude and longitude of the pointer."""
666+ """
667+ When one clicks on a Map that contains a LatLngPopup,
668+ a popup is shown that displays the latitude and longitude of the pointer.
669+
670+ """
657671 def __init__ (self ):
658672 super (LatLngPopup , self ).__init__ ()
659673 self ._name = 'LatLngPopup'
0 commit comments