Skip to content

Commit 112c99b

Browse files
JasonGrace2282behacklchopan050
authored
Fix SyntaxWarnings when building the docs and bump readthedocs to Python 3.13 (#3924)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at> Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
1 parent 46dbf3d commit 112c99b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build:
33
os: ubuntu-22.04
44

55
tools:
6-
python: "3.11"
6+
python: "3.13"
77

88
apt_packages:
99
- libpango1.0-dev

docs/source/examples.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Plotting with Manim
341341
axes.i2gp(TAU, cos_graph), color=YELLOW, line_func=Line
342342
)
343343
line_label = axes.get_graph_label(
344-
cos_graph, "x=2\pi", x_val=TAU, direction=UR, color=WHITE
344+
cos_graph, r"x=2\pi", x_val=TAU, direction=UR, color=WHITE
345345
)
346346

347347
plot = VGroup(axes, sin_graph, cos_graph, vert_line)
@@ -482,7 +482,7 @@ Plotting with Manim
482482
tips=False,
483483
)
484484
labels = ax.get_axis_labels(
485-
x_label=Tex("$\Delta Q$"), y_label=Tex("T[$^\circ C$]")
485+
x_label=Tex(r"$\Delta Q$"), y_label=Tex(r"T[$^\circ C$]")
486486
)
487487

488488
x_vals = [0, 8, 38, 39]
@@ -785,8 +785,8 @@ Advanced Projects
785785

786786
def add_x_labels(self):
787787
x_labels = [
788-
MathTex("\pi"), MathTex("2 \pi"),
789-
MathTex("3 \pi"), MathTex("4 \pi"),
788+
MathTex(r"\pi"), MathTex(r"2 \pi"),
789+
MathTex(r"3 \pi"), MathTex(r"4 \pi"),
790790
]
791791

792792
for i in range(len(x_labels)):

manim/animation/fading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def construct(self):
166166
dot = Dot(UP * 2 + LEFT)
167167
self.add(dot)
168168
tex = Tex(
169-
"FadeOut with ", "shift ", " or target\\_position", " and scale"
169+
"FadeOut with ", "shift ", r" or target\_position", " and scale"
170170
).scale(1)
171171
animations = [
172172
FadeOut(tex[0]),

manim/mobject/geometry/line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ def construct(self):
10681068
10691069
angle = Angle(line1, line2, radius=0.4)
10701070
1071-
value = DecimalNumber(angle.get_value(degrees=True), unit="^{\\circ}")
1071+
value = DecimalNumber(angle.get_value(degrees=True), unit=r"^{\circ}")
10721072
value.next_to(angle, UR)
10731073
10741074
self.add(line1, line2, angle, value)

manim/mobject/matrix.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def construct(self):
1515
m2 = DecimalMatrix(
1616
[[3.456, 2.122], [33.2244, 12.33]],
1717
element_to_mobject_config={"num_decimal_places": 2},
18-
left_bracket="\\{",
19-
right_bracket="\\}")
18+
left_bracket=r"\{",
19+
right_bracket=r"\}")
2020
m3 = MobjectMatrix(
2121
[[Circle().scale(0.3), Square().scale(0.3)],
2222
[MathTex("\\pi").scale(2), Star().scale(0.3)]],
@@ -294,7 +294,7 @@ def get_columns(self):
294294
295295
class GetColumnsExample(Scene):
296296
def construct(self):
297-
m0 = Matrix([["\\pi", 3], [1, 5]])
297+
m0 = Matrix([[r"\pi", 3], [1, 5]])
298298
m0.add(SurroundingRectangle(m0.get_columns()[1]))
299299
self.add(m0)
300300
"""

manim/utils/docbuild/manim_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def run(self) -> list[nodes.Element]:
174174
# Rendering is skipped if the tag skip-manim is present,
175175
# or if we are making the pot-files
176176
should_skip = (
177-
"skip-manim" in self.state.document.settings.env.app.builder.tags.tags
177+
"skip-manim" in self.state.document.settings.env.app.builder.tags
178178
or self.state.document.settings.env.app.builder.name == "gettext"
179179
)
180180
if should_skip:

0 commit comments

Comments
 (0)