Skip to content

Commit 93ca247

Browse files
authored
Merge pull request #2206 from python-visualization/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 0ff5d99 + 3791b85 commit 93ca247

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+228
-471
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ repos:
1717
files: requirements-dev.txt
1818

1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.14.10
20+
rev: v0.14.14
2121
hooks:
2222
- id: ruff
2323

2424
- repo: https://github.com/psf/black-pre-commit-mirror
25-
rev: 25.12.0
25+
rev: 26.1.0
2626
hooks:
2727
- id: black
2828
language_version: python3

folium/elements.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,14 @@ class EventHandler(MacroElement):
122122
>>> g.add_child(EventHandler("mouseout", reset))
123123
'''
124124

125-
_template = Template(
126-
"""
125+
_template = Template("""
127126
{% macro script(this, kwargs) %}
128127
{{ this._parent.get_name()}}.{{ this.method }}(
129128
{{ this.event|tojson}},
130129
{{ this.handler.js_code }}
131130
);
132131
{% endmacro %}
133-
"""
134-
)
132+
""")
135133

136134
def __init__(self, event: str, handler: JsCode, once: bool = False):
137135
super().__init__()
@@ -144,13 +142,11 @@ def __init__(self, event: str, handler: JsCode, once: bool = False):
144142
class ElementAddToElement(MacroElement):
145143
"""Abstract class to add an element to another element."""
146144

147-
_template = Template(
148-
"""
145+
_template = Template("""
149146
{% macro script(this, kwargs) %}
150147
{{ this.element_name }}.addTo({{ this.element_parent_name }});
151148
{% endmacro %}
152-
"""
153-
)
149+
""")
154150

155151
def __init__(self, element_name: str, element_parent_name: str):
156152
super().__init__()
@@ -161,13 +157,11 @@ def __init__(self, element_name: str, element_parent_name: str):
161157
class IncludeStatement(MacroElement):
162158
"""Generate an include statement on a class."""
163159

164-
_template = Template(
165-
"""
160+
_template = Template("""
166161
{{ this.leaflet_class_name }}.include(
167162
{{ this.options | tojavascript }}
168163
)
169-
"""
170-
)
164+
""")
171165

172166
def __init__(self, leaflet_class_name: str, **kwargs):
173167
super().__init__()
@@ -181,8 +175,7 @@ def render(self, *args, **kwargs):
181175
class MethodCall(MacroElement):
182176
"""Abstract class to add an element to another element."""
183177

184-
_template = Template(
185-
"""
178+
_template = Template("""
186179
{% macro script(this, kwargs) %}
187180
{{ this.target }}.{{ this.method }}(
188181
{% for arg in this.args %}
@@ -191,8 +184,7 @@ class MethodCall(MacroElement):
191184
{{ this.kwargs | tojavascript }}
192185
);
193186
{% endmacro %}
194-
"""
195-
)
187+
""")
196188

197189
def __init__(self, target: MacroElement, method: str, *args, **kwargs):
198190
super().__init__()

0 commit comments

Comments
 (0)