Skip to content

Commit 97f818e

Browse files
[pre-commit.ci] pre-commit autoupdate (#4035)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.0...v0.9.1) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@v1.13.0...v1.14.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * enh: ignore ruff lint rule A005 (module shadowing standard library module) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Benjamin Hackl <[email protected]>
1 parent c933c74 commit 97f818e

File tree

22 files changed

+78
-62
lines changed

22 files changed

+78
-62
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: check-toml
1414
name: Validate Poetry
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.8.0
16+
rev: v0.9.1
1717
hooks:
1818
- id: ruff
1919
name: ruff lint
@@ -22,7 +22,7 @@ repos:
2222
- id: ruff-format
2323
types: [python]
2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.13.0
25+
rev: v1.14.1
2626
hooks:
2727
- id: mypy
2828
additional_dependencies:

manim/animation/speedmodifier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ def __init__(
113113
self.anim = self.setup(anim)
114114

115115
if affects_speed_updaters:
116-
assert (
117-
ChangeSpeed.is_changing_dt is False
118-
), "Only one animation at a time can play that changes speed (dt) for ChangeSpeed updaters"
116+
assert ChangeSpeed.is_changing_dt is False, (
117+
"Only one animation at a time can play that changes speed (dt) for ChangeSpeed updaters"
118+
)
119119
ChangeSpeed.is_changing_dt = True
120120
self.t = 0
121121
self.affects_speed_updaters = affects_speed_updaters

manim/animation/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def __init__(self, mobject: Mobject, **kwargs) -> None:
429429
def check_validity_of_input(self, mobject: Mobject) -> None:
430430
if not hasattr(mobject, "target"):
431431
raise ValueError(
432-
"MoveToTarget called on mobject" "without attribute 'target'",
432+
"MoveToTarget called on mobjectwithout attribute 'target'",
433433
)
434434

435435

manim/cli/render/render_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def validate_resolution(
143143
+ ", ".join(
144144
reversed(
145145
[
146-
f'{q["pixel_width"]}x{q["pixel_height"]} {q["frame_rate"]}FPS'
146+
f"{q['pixel_width']}x{q['pixel_height']} {q['frame_rate']}FPS"
147147
for q in QUALITIES.values()
148148
if q["flag"]
149149
]

manim/mobject/graph.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,9 @@ class LargeTreeGeneration(MovingCameraScene):
15011501
VERTEX_CONF = {"radius": 0.25, "color": BLUE_B, "fill_opacity": 1}
15021502
15031503
def expand_vertex(self, g, vertex_id: str, depth: int):
1504-
new_vertices = [f"{vertex_id}/{i}" for i in range(self.CHILDREN_PER_VERTEX)]
1504+
new_vertices = [
1505+
f"{vertex_id}/{i}" for i in range(self.CHILDREN_PER_VERTEX)
1506+
]
15051507
new_edges = [(vertex_id, child_id) for child_id in new_vertices]
15061508
g.add_edges(
15071509
*new_edges,

manim/mobject/graphing/coordinate_systems.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,7 +3235,7 @@ def get_coordinate_labels(
32353235
elif self.azimuth_units == "degrees":
32363236
a_tex = [
32373237
MathTex(
3238-
f'{360 * i["label"]:g}' + r"^{\circ}",
3238+
f"{360 * i['label']:g}" + r"^{\circ}",
32393239
font_size=self.azimuth_label_font_size,
32403240
).next_to(
32413241
i["point"],
@@ -3248,7 +3248,7 @@ def get_coordinate_labels(
32483248
elif self.azimuth_units == "gradians":
32493249
a_tex = [
32503250
MathTex(
3251-
f'{400 * i["label"]:g}' + r"^{g}",
3251+
f"{400 * i['label']:g}" + r"^{g}",
32523252
font_size=self.azimuth_label_font_size,
32533253
).next_to(
32543254
i["point"],
@@ -3261,7 +3261,7 @@ def get_coordinate_labels(
32613261
elif self.azimuth_units is None:
32623262
a_tex = [
32633263
MathTex(
3264-
f'{i["label"]:g}',
3264+
f"{i['label']:g}",
32653265
font_size=self.azimuth_label_font_size,
32663266
).next_to(
32673267
i["point"],

manim/mobject/mobject.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ def animate(self) -> _AnimationBuilder | Self:
318318
319319
::
320320
321-
self.play(my_mobject.animate.shift(RIGHT), my_mobject.animate.rotate(PI))
321+
self.play(
322+
my_mobject.animate.shift(RIGHT), my_mobject.animate.rotate(PI)
323+
)
322324
323325
make use of method chaining.
324326
@@ -3070,8 +3072,7 @@ def __getattr__(self, method_name) -> types.MethodType:
30703072

30713073
if (self.is_chaining and has_overridden_animation) or self.overridden_animation:
30723074
raise NotImplementedError(
3073-
"Method chaining is currently not supported for "
3074-
"overridden animations",
3075+
"Method chaining is currently not supported for overridden animations",
30753076
)
30763077

30773078
def update_target(*method_args, **method_kwargs):

manim/mobject/opengl/opengl_mobject.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,9 @@ def animate(self) -> _AnimationBuilder | Self:
401401
402402
::
403403
404-
self.play(my_mobject.animate.shift(RIGHT), my_mobject.animate.rotate(PI))
404+
self.play(
405+
my_mobject.animate.shift(RIGHT), my_mobject.animate.rotate(PI)
406+
)
405407
406408
make use of method chaining for ``animate``, meaning::
407409
@@ -2957,8 +2959,7 @@ def __getattr__(self, method_name: str) -> Callable[..., Self]:
29572959

29582960
if (self.is_chaining and has_overridden_animation) or self.overridden_animation:
29592961
raise NotImplementedError(
2960-
"Method chaining is currently not supported for "
2961-
"overridden animations",
2962+
"Method chaining is currently not supported for overridden animations",
29622963
)
29632964

29642965
def update_target(*method_args, **method_kwargs):

manim/mobject/text/text_mobject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def _merge_settings(
703703
default = default_args[arg]
704704
if left != default and getattr(right_setting, arg) != default:
705705
raise ValueError(
706-
f"Ambiguous style for text '{self.text[right_setting.start:right_setting.end]}':"
706+
f"Ambiguous style for text '{self.text[right_setting.start : right_setting.end]}':"
707707
+ f"'{arg}' cannot be both '{left}' and '{right}'."
708708
)
709709
setattr(right_setting, arg, left if left != default else right)
@@ -1561,7 +1561,7 @@ def register_font(font_file: str | Path):
15611561
logger.debug("Found file at %s", file_path.absolute())
15621562
break
15631563
else:
1564-
error = f"Can't find {font_file}." f"Tried these : {possible_paths}"
1564+
error = f"Can't find {font_file}.Tried these : {possible_paths}"
15651565
raise FileNotFoundError(error)
15661566

15671567
try:

manim/mobject/types/vectorized_mobject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ def __init__(
21192119
self.add(*vmobjects)
21202120

21212121
def __repr__(self) -> str:
2122-
return f'{self.__class__.__name__}({", ".join(str(mob) for mob in self.submobjects)})'
2122+
return f"{self.__class__.__name__}({', '.join(str(mob) for mob in self.submobjects)})"
21232123

21242124
def __str__(self) -> str:
21252125
return (

0 commit comments

Comments
 (0)