Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit 38b8d15

Browse files
committed
remove mdformat from pre-commit
1 parent 2187e3a commit 38b8d15

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ repos:
88
# Run the formatter.
99
- id: ruff-format
1010

11-
- repo: https://github.com/executablebooks/mdformat
12-
rev: 0.7.22
13-
hooks:
14-
- id: mdformat
15-
additional_dependencies:
16-
- mdformat-ruff
17-
1811
- repo: https://github.com/pre-commit/pre-commit-hooks
1912
rev: v5.0.0
2013
hooks:

src/flet_map/map.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,9 @@ async def move_to_async(
451451
Raises:
452452
AssertionError: If `zoom` is not `None` and is negative.
453453
"""
454-
assert zoom is None or zoom >= 0, "zoom must be greater than or equal to zero"
454+
assert zoom is None or zoom >= 0, (
455+
f"zoom must be greater than or equal to zero, got {zoom}"
456+
)
455457
await self._invoke_method_async(
456458
method_name="move_to",
457459
arguments={

src/flet_map/marker_layer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,18 @@ class Marker(ft.Control):
7070
"""
7171
Alignment of the marker relative to the normal center at [`coordinates`][..].
7272
73-
Defaults to the value of the parent [`MarkerLayer.alignment`][(m).].
73+
Defaults to the value of the parent [`MarkerLayer.alignment`][(p).].
7474
"""
7575

7676
def before_update(self):
7777
super().before_update()
7878
assert self.content.visible, "content must be visible"
79-
assert self.height >= 0, "height must be greater than or equal to 0"
80-
assert self.width >= 0, "width must be greater than or equal to 0"
79+
assert self.height >= 0, (
80+
f"height must be greater than or equal to 0, got {self.height}"
81+
)
82+
assert self.width >= 0, (
83+
f"width must be greater than or equal to 0, got {self.width}"
84+
)
8185

8286

8387
@ft.control("MarkerLayer")

src/flet_map/polygon_layer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class PolygonMarker(ft.Control):
7676
def before_update(self):
7777
super().before_update()
7878
assert self.border_stroke_width >= 0, (
79-
"border_stroke_width must be greater than or equal to 0"
79+
f"border_stroke_width must be greater than or equal to 0, "
80+
f"got {self.border_stroke_width}"
8081
)
8182

8283

src/flet_map/types.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ class DashedStrokePattern(StrokePattern):
194194
"""
195195

196196
def __post_init__(self):
197-
assert len(self.segments) >= 2, "segments must contain at least two items"
197+
assert len(self.segments) >= 2, (
198+
f"segments must contain at least two items, got {len(self.segments)}"
199+
)
198200
assert len(self.segments) % 2 == 0, "segments must have an even length"
199201
self._type = "dashed"
200202

@@ -717,7 +719,7 @@ class InstantaneousTileDisplay(TileDisplay):
717719

718720
def __post_init__(self):
719721
assert 0.0 <= self.opacity <= 1.0, (
720-
"start_opacity must be between 0.0 and 1.0 (inclusive)"
722+
f"opacity must be between 0.0 and 1.0 inclusive, got {self.opacity}"
721723
)
722724
self._type = "instantaneous"
723725

@@ -745,10 +747,11 @@ class FadeInTileDisplay(TileDisplay):
745747

746748
def __post_init__(self):
747749
assert 0.0 <= self.start_opacity <= 1.0, (
748-
"start_opacity must be between 0.0 and 1.0 (inclusive)"
750+
f"start_opacity must be between 0.0 and 1.0 inclusive, got {self.start_opacity}"
749751
)
750752
assert 0.0 <= self.reload_start_opacity <= 1.0, (
751-
"reload_start_opacity must be between 0.0 and 1.0 (inclusive)"
753+
f"reload_start_opacity must be between 0.0 and 1.0 inclusive, "
754+
f"got {self.reload_start_opacity}"
752755
)
753756
self._type = "fadein"
754757

0 commit comments

Comments
 (0)