Skip to content

Commit bee611b

Browse files
authored
Merge pull request #1632 from ocefpaf/pre-commit
Pre commit
2 parents c785f43 + 92656be commit bee611b

File tree

16 files changed

+65
-25
lines changed

16 files changed

+65
-25
lines changed

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
env:
9+
FORCE_COLOR: "1"
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.x'
15+
- id: file_changes
16+
uses: trilom/[email protected]
17+
with:
18+
output: ' '
19+
- uses: pre-commit/[email protected]
20+
with:
21+
extra_args: --files ${{ steps.file_changes.outputs.files}}

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Get tags
2121
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22-
22+
2323

2424
- name: Install build tools
2525
run: |

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
exclude: examples/data/|.*\.css|.*\.json|.*\.geojson|.*\.html
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.3.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: check-ast
9+
- id: debug-statements
10+
- id: end-of-file-fixer
11+
- id: check-docstring-first
12+
- id: check-added-large-files
13+
- id: requirements-txt-fixer
14+
- id: file-contents-sorter
15+
files: requirements-dev.txt
16+
17+
- repo: https://github.com/PyCQA/flake8
18+
rev: 5.0.4
19+
hooks:
20+
- id: flake8
21+
exclude: docs/conf.py
22+
args: [--max-line-length=120]

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Bug fixes
7777
- Fix HeatMapWithTime plugin (@farisnanosoft @conengmo #1228)
7878
- Fix adding GeoJSON to MarkerCluster (@conengmo #1190)
7979

80-
Documentation
80+
Documentation
8181

8282
- Typo corrections in examples/Colormaps.ipynb (@nik-ahuja #1215)
8383

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19-
SOFTWARE.
19+
SOFTWARE.

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.. |DOI| image:: https://zenodo.org/badge/18669/python-visualization/folium.svg
1616
:target: https://zenodo.org/badge/latestdoi/18669/python-visualization/folium
1717
:alt: DOI
18-
18+
1919
.. |binder| image:: https://mybinder.org/badge_logo.svg
2020
:target: https://mybinder.org/v2/gh/python-visualization/folium/main?filepath=examples
2121

@@ -28,7 +28,7 @@ Python Data, Leaflet.js Maps
2828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2929

3030
`folium` builds on the data wrangling strengths of the Python ecosystem and the
31-
mapping strengths of the Leaflet.js library. Manipulate your data in Python,
31+
mapping strengths of the Leaflet.js library. Manipulate your data in Python,
3232
then visualize it in a Leaflet map via `folium`.
3333

3434
Installation

docs/flask.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The trick is to return folium's HTML representation.
66
Here is an example on how to do that:
77

88

9-
.. literalinclude:: ../examples/flask_example.py
9+
.. literalinclude:: ../examples/flask_example.py

folium/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
if sys.version_info < (3, 0):
5757
raise ImportError(
5858
"""You are running folium {} on Python 2
59-
59+
6060
folium 0.9 and above are no longer compatible with Python 2, but somehow
6161
you got this version anyway. Make sure you have pip >= 9.0 to avoid this
6262
kind of issue, as well as setuptools >= 24.2:
63-
63+
6464
$ pip install pip setuptools --upgrade
65-
65+
6666
Your choices:
67-
67+
6868
- Upgrade to Python 3.
69-
69+
7070
- Install an older version of folium:
71-
71+
7272
$ pip install 'folium<0.9.0'
73-
73+
7474
""".format(__version__)) # noqa
7575

7676
__all__ = [

folium/plugins/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Search(JSCSSMixin, MacroElement):
4848
{% endif %}
4949
collapsed: {{this.collapsed|tojson|safe}},
5050
textPlaceholder: '{{this.placeholder}}',
51-
position:'{{this.position}}',
51+
position:'{{this.position}}',
5252
{% if this.geom_type == 'Point' %}
5353
initial: false,
5454
{% if this.search_zoom %}

folium/templates/leaflet_heat.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.
1+
Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.
1+
Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ pytest-cov
2626
pytest-flake8
2727
pytest-xdist
2828
scipy
29-
setuptools_scm
3029
selenium
30+
setuptools_scm
3131
sphinx
3232
twine>=3.2.0
33-
wheel
3433
vega_datasets
35-
vincent
34+
vincent
35+
wheel

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ license_file = LICENSE.txt
1313
universal = 1
1414

1515
[check-manifest]
16-
ignore =
16+
ignore =
1717
*.yml
1818
docs
1919
docs/*

tests/test_features.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def test_geojson_marker():
176176
).add_to(m)
177177

178178

179-
180179
def test_geojson_find_identifier():
181180

182181
def _create(*properties):

tests/test_raster_layers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
Test raster_layers
3-
-----------------
3+
------------------
44
55
"""
6-
import pytest
7-
86
import folium
97
from folium.utilities import normalize
108

0 commit comments

Comments
 (0)