Skip to content

Commit e6777d6

Browse files
authored
Fix failing pre-commit tests (#4434)
1 parent 855ea86 commit e6777d6

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
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 pyproject.toml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.12.9
16+
rev: v0.13.3
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.17.1
25+
rev: v1.18.2
2626
hooks:
2727
- id: mypy
2828
additional_dependencies:

manim/mobject/graphing/probability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_subdivision_braces_and_labels(
170170
"direction": direction,
171171
"buff": buff,
172172
}
173-
return VGroup(parts.braces, parts.labels) # type: ignore[arg-type]
173+
return VGroup(parts.braces, parts.labels)
174174

175175
def get_side_braces_and_labels(
176176
self,

manim/scene/vector_space_scene.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ def add_transformable_label(
971971
)
972972
label_mob.vector = vector # type: ignore[attr-defined]
973973
label_mob.kwargs = kwargs # type: ignore[attr-defined]
974-
if "animate" in label_mob.kwargs: # type: ignore[operator]
975-
label_mob.kwargs.pop("animate") # type: ignore[attr-defined]
974+
if "animate" in label_mob.kwargs:
975+
label_mob.kwargs.pop("animate")
976976
self.transformable_labels.append(label_mob)
977977
return cast(MathTex, label_mob)
978978

manim/utils/docbuild/autoaliasattr_directive.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from docutils import nodes
88
from docutils.parsers.rst import Directive
9-
from docutils.statemachine import ViewList
9+
from docutils.statemachine import StringList
1010

1111
from manim.utils.docbuild.module_parsing import parse_module_attributes
1212

@@ -143,7 +143,7 @@ def run(self) -> list[nodes.Element]:
143143
# Using the `.. class::` directive is CRUCIAL, since
144144
# function/method parameters are always annotated via
145145
# classes - therefore Sphinx expects a class
146-
unparsed = ViewList(
146+
unparsed = StringList(
147147
[
148148
f".. class:: {alias_name}",
149149
"",
@@ -169,7 +169,9 @@ def run(self) -> list[nodes.Element]:
169169
# Add all the lines with 4 spaces behind, to consider all the
170170
# documentation as a paragraph INSIDE the `.. class::` block
171171
doc_lines = alias_doc.split("\n")
172-
unparsed.extend(ViewList([f" {line}" for line in doc_lines]))
172+
unparsed.extend(
173+
StringList([f" {line}" for line in doc_lines])
174+
)
173175

174176
# Parse the reST text into a fresh container
175177
# https://www.sphinx-doc.org/en/master/extdev/markupapi.html#parsing-directive-content-as-rest
@@ -191,7 +193,7 @@ def run(self) -> list[nodes.Element]:
191193
# Using the `.. class::` directive is CRUCIAL, since
192194
# function/method parameters are always annotated via
193195
# classes - therefore Sphinx expects a class
194-
unparsed = ViewList(
196+
unparsed = StringList(
195197
[
196198
f".. class:: {name}",
197199
"",
@@ -218,7 +220,7 @@ def run(self) -> list[nodes.Element]:
218220
# Let Sphinx Autosummary do its thing as always
219221
# Add all the attribute names with 4 spaces behind, so that
220222
# they're considered as INSIDE the `.. autosummary::` block
221-
unparsed = ViewList(
223+
unparsed = StringList(
222224
[
223225
".. autosummary::",
224226
*(f" {attr}" for attr in module_attrs_list),

0 commit comments

Comments
 (0)