Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ repos:
files: requirements-dev.txt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.2.0
hooks:
- id: ruff

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
language_version: python3
Expand Down
12 changes: 6 additions & 6 deletions folium/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ class GeoJson(Layer):

>>> # Provide a style_function that color all states green but Alabama.
>>> style_function = lambda x: {
... "fillColor": "#0000ff"
... if x["properties"]["name"] == "Alabama"
... else "#00ff00"
... "fillColor": (
... "#0000ff" if x["properties"]["name"] == "Alabama" else "#00ff00"
... )
... }
>>> GeoJson(geojson, style_function=style_function)

Expand Down Expand Up @@ -947,9 +947,9 @@ class TopoJson(JSCSSMixin, Layer):

>>> # Provide a style_function that color all states green but Alabama.
>>> style_function = lambda x: {
... "fillColor": "#0000ff"
... if x["properties"]["name"] == "Alabama"
... else "#00ff00"
... "fillColor": (
... "#0000ff" if x["properties"]["name"] == "Alabama" else "#00ff00"
... )
... }
>>> TopoJson(topo_json, "object.myobject", style_function=style_function)

Expand Down
1 change: 1 addition & 0 deletions folium/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Classes for drawing maps.

"""

import warnings
from collections import OrderedDict
from typing import Dict, List, Optional, Sequence, Tuple, Type, Union
Expand Down
1 change: 1 addition & 0 deletions folium/raster_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Wraps leaflet TileLayer, WmsTileLayer (TileLayer.WMS), ImageOverlay, and VideoOverlay

"""

from typing import Any, Callable, Optional, Union

import xyzservices
Expand Down
1 change: 1 addition & 0 deletions folium/vector_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Wraps leaflet Polyline, Polygon, Rectangle, Circle, and CircleMarker

"""

from typing import List, Optional, Sequence, Union

from branca.element import MacroElement
Expand Down
1 change: 1 addition & 0 deletions tests/test_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
----------------

"""

import warnings

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/test_raster_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
------------------

"""

import pytest
import xyzservices
from jinja2 import Template
Expand Down