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>
This commit is contained in:
Aarush Deshpande 2024-12-16 11:04:07 -05:00 committed by GitHub
commit 112c99ba4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 11 deletions

View file

@ -3,7 +3,7 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.13"
apt_packages:
- libpango1.0-dev

View file

@ -341,7 +341,7 @@ Plotting with Manim
axes.i2gp(TAU, cos_graph), color=YELLOW, line_func=Line
)
line_label = axes.get_graph_label(
cos_graph, "x=2\pi", x_val=TAU, direction=UR, color=WHITE
cos_graph, r"x=2\pi", x_val=TAU, direction=UR, color=WHITE
)
plot = VGroup(axes, sin_graph, cos_graph, vert_line)
@ -482,7 +482,7 @@ Plotting with Manim
tips=False,
)
labels = ax.get_axis_labels(
x_label=Tex("$\Delta Q$"), y_label=Tex("T[$^\circ C$]")
x_label=Tex(r"$\Delta Q$"), y_label=Tex(r"T[$^\circ C$]")
)
x_vals = [0, 8, 38, 39]
@ -785,8 +785,8 @@ Advanced Projects
def add_x_labels(self):
x_labels = [
MathTex("\pi"), MathTex("2 \pi"),
MathTex("3 \pi"), MathTex("4 \pi"),
MathTex(r"\pi"), MathTex(r"2 \pi"),
MathTex(r"3 \pi"), MathTex(r"4 \pi"),
]
for i in range(len(x_labels)):

View file

@ -166,7 +166,7 @@ class FadeOut(_Fade):
dot = Dot(UP * 2 + LEFT)
self.add(dot)
tex = Tex(
"FadeOut with ", "shift ", " or target\\_position", " and scale"
"FadeOut with ", "shift ", r" or target\_position", " and scale"
).scale(1)
animations = [
FadeOut(tex[0]),

View file

@ -1068,7 +1068,7 @@ class Angle(VMobject, metaclass=ConvertToOpenGL):
angle = Angle(line1, line2, radius=0.4)
value = DecimalNumber(angle.get_value(degrees=True), unit="^{\\circ}")
value = DecimalNumber(angle.get_value(degrees=True), unit=r"^{\circ}")
value.next_to(angle, UR)
self.add(line1, line2, angle, value)

View file

@ -15,8 +15,8 @@ Examples
m2 = DecimalMatrix(
[[3.456, 2.122], [33.2244, 12.33]],
element_to_mobject_config={"num_decimal_places": 2},
left_bracket="\\{",
right_bracket="\\}")
left_bracket=r"\{",
right_bracket=r"\}")
m3 = MobjectMatrix(
[[Circle().scale(0.3), Square().scale(0.3)],
[MathTex("\\pi").scale(2), Star().scale(0.3)]],
@ -294,7 +294,7 @@ class Matrix(VMobject, metaclass=ConvertToOpenGL):
class GetColumnsExample(Scene):
def construct(self):
m0 = Matrix([["\\pi", 3], [1, 5]])
m0 = Matrix([[r"\pi", 3], [1, 5]])
m0.add(SurroundingRectangle(m0.get_columns()[1]))
self.add(m0)
"""

View file

@ -174,7 +174,7 @@ class ManimDirective(Directive):
# Rendering is skipped if the tag skip-manim is present,
# or if we are making the pot-files
should_skip = (
"skip-manim" in self.state.document.settings.env.app.builder.tags.tags
"skip-manim" in self.state.document.settings.env.app.builder.tags
or self.state.document.settings.env.app.builder.name == "gettext"
)
if should_skip: