Skip to content

Commit 1203ef6

Browse files
author
Martin Journois
committed
Docstrings cleaning
1 parent d2011d3 commit 1203ef6

5 files changed

Lines changed: 28 additions & 30 deletions

File tree

folium/colormap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ def to_step(self, n=None, index=None, data=None, method=None,
432432
order-of-magnitude integer. For example, 2100 is rounded to
433433
2000, 2790 to 3000.
434434
435-
Return
436-
------
435+
Returns
436+
-------
437437
A StepColormap with `n=len(index)-1` colors.
438438
439439
Examples:

folium/element.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ def save(self, outfile, close_file=True, **kwargs):
146146

147147

148148
class Link(Element):
149-
"""Link
150-
----
151-
152-
TODO: docstring.
153-
"""
149+
"""TODO: docstring."""
154150
def get_code(self):
155151
"""TODO : docstring."""
156152
if self.code is None:

folium/folium.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ def simple_marker(self, location=None, popup=None,
168168
-------
169169
Marker names and HTML in obj.template_vars
170170
171-
Example
172-
-------
171+
Examples
172+
--------
173173
>>> map.simple_marker(location=[45.5, -122.3], popup='Portland, OR')
174174
>>> map.simple_marker(location=[45.5, -122.3], popup=(vis, 'vis.json'))
175175
@@ -224,8 +224,8 @@ def line(self, locations,
224224
Note: If the optional styles are omitted, they will not be included
225225
in the HTML output and will obtain the Leaflet defaults listed above.
226226
227-
Example
228-
-------
227+
Examples
228+
--------
229229
>>> map.line(locations=[(45.5, -122.3), (42.3, -71.0)])
230230
>>> map.line(locations=[(45.5, -122.3), (42.3, -71.0)],
231231
line_color='red', line_opacity=1.0)
@@ -274,8 +274,8 @@ def multiline(self, locations, line_color=None, line_opacity=None,
274274
Note: If the optional styles are omitted, they will not be included
275275
in the HTML output and will obtain the Leaflet defaults listed above.
276276
277-
Example
278-
-------
277+
Examples
278+
--------
279279
# FIXME: Add another example.
280280
>>> m.multiline(locations=[[(45.5236, -122.675), (45.5236, -122.675)],
281281
[(45.5237, -122.675), (45.5237, -122.675)],
@@ -328,8 +328,8 @@ def circle_marker(self, location=None, radius=500, popup=None,
328328
-------
329329
Circle names and HTML in obj.template_vars
330330
331-
Example
332-
-------
331+
Examples
332+
--------
333333
>>> map.circle_marker(location=[45.5, -122.3],
334334
radius=1000, popup='Portland, OR')
335335
>>> map.circle_marker(location=[45.5, -122.3],
@@ -433,8 +433,8 @@ def click_for_marker(self, popup=None):
433433
popup:
434434
Custom popup text
435435
436-
Example
437-
-------
436+
Examples
437+
--------
438438
>>> map.click_for_marker(popup='Your Custom Text')
439439
440440
"""
@@ -464,8 +464,8 @@ def fit_bounds(self, bounds, padding_top_left=None,
464464
max_zoom: int, default None
465465
Maximum zoom to be used.
466466
467-
Example
468-
-------
467+
Examples
468+
--------
469469
>>> map.fit_bounds([[52.193636, -2.221575], [52.636878, -1.139759]])
470470
471471
"""
@@ -572,12 +572,12 @@ def choropleth(self, geo_path=None, geo_str=None, data_out='data.json',
572572
reset: boolean, default False
573573
Remove all current geoJSON layers, start with new layer
574574
575-
Output
576-
------
575+
Returns
576+
-------
577577
GeoJSON data layer in obj.template_vars
578578
579-
Example
580-
-------
579+
Examples
580+
--------
581581
>>> m.choropleth(geo_path='us-states.json', line_color='blue',
582582
line_weight=3)
583583
>>> m.choropleth(geo_path='geo.json', data=df,
@@ -729,12 +729,13 @@ def image_overlay(self, data, opacity=0.25, min_lat=-90.0, max_lat=90.0,
729729
mercator_project : bool, default False, used only for array-like image.
730730
Transforms the data to project (longitude,latitude) coordinates
731731
to the Mercator projection.
732-
Output
733-
------
732+
733+
Returns
734+
-------
734735
Image overlay data layer in obj.template_vars
735736
736737
Examples
737-
-------
738+
--------
738739
# assumes a map object `m` has been created
739740
>>> import numpy as np
740741
>>> data = np.random.random((100,100))

folium/map.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ class Marker(MacroElement):
444444
-------
445445
Marker names and HTML in obj.template_vars
446446
447-
Example
448-
-------
447+
Examples
448+
--------
449449
>>> Marker(location=[45.5, -122.3], popup='Portland, OR')
450450
>>> Marker(location=[45.5, -122.3], popup=folium.Popup('Portland, OR'))
451451
"""

folium/utilities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ def linear_gradient(hexList, nColors):
6060
nColors where the colors are linearly interpolated between the
6161
(r, g, b) tuples that are given.
6262
63-
Example:
64-
linear_gradient([(0, 0, 0), (255, 0, 0), (255, 255, 0)], 100)
63+
Examples
64+
--------
65+
>>> linear_gradient([(0, 0, 0), (255, 0, 0), (255, 255, 0)], 100)
6566
6667
"""
6768
def _scale(start, finish, length, i):

0 commit comments

Comments
 (0)