Skip to content

Commit f9dcfdd

Browse files
committed
Fix docs for Variable + Remove unused imports
1 parent 41f6f05 commit f9dcfdd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

manim/mobject/numbers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55

66
from ..constants import *
7-
from ..mobject.svg.tex_mobject import MathTex, SingleStringMathTex, Tex
8-
from ..mobject.svg.text_mobject import Text
9-
from ..mobject.types.vectorized_mobject import VDict, VMobject
7+
from ..mobject.svg.tex_mobject import MathTex, SingleStringMathTex
8+
from ..mobject.types.vectorized_mobject import VMobject
109
from ..mobject.value_tracker import ValueTracker
1110

1211

@@ -158,8 +157,8 @@ class Variable(VMobject):
158157
----------
159158
var : Union[:class:`int`, :class:`float`]
160159
The python variable you need to keep track of and display.
161-
label : Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`Text`]
162-
The label for your variable, for example `x = ...`. To use math mode, for e.g.
160+
label : Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`Text`, :class:`TexSymbol`, :class:`SingleStringMathTex`, :class:`MathTexFromPresetString`]
161+
The label for your variable, for example ``x = ...``. To use math mode, for e.g.
163162
subscripts, superscripts, etc. simply pass in a raw string.
164163
var_type : Union[:class:`DecimalNumber`, :class:`Integer`], optional
165164
The class used for displaying the number. Defaults to :class:`DecimalNumber`.
@@ -171,8 +170,8 @@ class Variable(VMobject):
171170
172171
Attributes
173172
----------
174-
label : Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`Text`]
175-
The label for your variable, for example `x = ...`.
173+
label : Union[:class:`str`, :class:`~.Tex`, :class:`~.MathTex`, :class:`Text`, :class:`TexSymbol`, :class:`SingleStringMathTex`, :class:`MathTexFromPresetString`]
174+
The label for your variable, for example ``x = ...``.
176175
tracker : :class:`~.ValueTracker`
177176
Useful in updating the value of your variable on-screen.
178177
value : Union[:class:`DecimalNumber`, :class:`Integer`]
@@ -181,6 +180,7 @@ class Variable(VMobject):
181180
Examples
182181
--------
183182
Normal usage::
183+
184184
# DecimalNumber type
185185
var = 0.5
186186
on_screen_var = Variable(var, "var", num_decimal_places=3)

0 commit comments

Comments
 (0)