Skip to content

Commit 60a7757

Browse files
authored
Adding spell checker as a pre-commit hook (#1544)
* adding codespell precommit hook * adding codespell config file * fixing typos * tweaking variable names to please codespell
1 parent fbee8ad commit 60a7757

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+105
-97
lines changed

.codespell_ignorelines

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<path id="nd" d="m 464.7,68.6 -1.1,2.8 .8,1.4 -.3,5.1 -.5,1.1 2.7,9.1 1.3,2.5 .7,14 1,2.7 -.4,5.8 2.9,7.4 .3,5.8 -.1,2.1 -29.5,-.4 -46,-2.1 -39.2,-2.9 5.2,-66.7 44.5,3.4 55.3,1.6 z">

.codespellrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
exclude-file=.codespell_ignorelines
3+
check-hidden=True

.flake8

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[flake8]
22
max-line-length = 88
3-
#Black Compatability
3+
#Black Compatibility
44
extend-ignore = E203, E266,
55
#Style Changes
66

77
#Temp
88
F841, B007,
9-
#I belive these are unfixable
9+
#I believe these are unfixable
1010
B006
1111
#Code Changes - Remove later -remove from .pre-commit-config.yaml
1212

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ repos:
2929
rev: 3.9.2
3030
hooks:
3131
- id: flake8
32+
- repo: https://github.com/codespell-project/codespell
33+
rev: v2.0.0
34+
hooks:
35+
- id: codespell

.pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ confidence=
5555
# can either give multiple identifiers separated by comma (,) or put this
5656
# option multiple times (only on the command line, not in the configuration
5757
# file where it should appear only once). You can also use "--disable=all" to
58-
# disable everything first and then reenable specific checks. For example, if
58+
# disable everything first and then re-enable specific checks. For example, if
5959
# you want to run only the similarities checker, you can use "--disable=all
6060
# --enable=similarities". If you want to run only the classes checker, but have
6161
# no Warning level messages displayed, use "--disable=all --enable=classes

docs/source/changelog/0.5.0-changelog.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Code quality improvements and similar refactors
300300
- Added `is_static_wait` attributes to Wait. (<=> if wait is a frozen frame).
301301
- Renamed and moved `scene.add_static_frame` to `renderer.freeze_current_frame`.
302302
- Now when calling play without animation, it raises `ValueError` instead of just a warning.
303-
- Fixed :pr:`874` by modfying `renderer.update_skipping_status`
303+
- Fixed :pr:`874` by modifying `renderer.update_skipping_status`
304304
- `renderer` starts the animation with `scene.begin_animations` (`scene.compile_animation_data` used to do this)
305305
- The run time and the time progression generation is now done in `scene.play_internal` although it'd make more sense that renderer processes it later.
306306
- Added a bunch of cool tests thanks to mocks, and thanks to the new syntax `scene.render`

docs/source/changelog/0.6.0-changelog.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Enhancements
177177
* `#1364 <https://github.com/ManimCommunity/manim/pull/1364>`__: Added :meth:`~.Mobject.match_points`
178178
- Added :func:`~.Mobject.match_points`, which transforms the points, positions and submobjects of a Mobject to match that of the other while keeping style unchanged.
179179

180-
* `#1363 <https://github.com/ManimCommunity/manim/pull/1363>`__: Change of TeX complier and output file format
180+
* `#1363 <https://github.com/ManimCommunity/manim/pull/1363>`__: Change of TeX compiler and output file format
181181

182182

183183
* `#1359 <https://github.com/ManimCommunity/manim/pull/1359>`__: Make FILE a required argument
@@ -309,7 +309,7 @@ Documentation-related changes
309309
* `#1338 <https://github.com/ManimCommunity/manim/pull/1338>`__: Added documentation guidelines for type hints
310310

311311

312-
* `#1342 <https://github.com/ManimCommunity/manim/pull/1342>`__: Mutliple VauleTracker example for docs
312+
* `#1342 <https://github.com/ManimCommunity/manim/pull/1342>`__: Multiple ValueTracker example for docs
313313

314314

315315
* `#1210 <https://github.com/ManimCommunity/manim/pull/1210>`__: Added tutorial chapter on coordinates of an mobject
@@ -333,7 +333,7 @@ Documentation-related changes
333333
* `#1300 <https://github.com/ManimCommunity/manim/pull/1300>`__: Added typehints for :class:`~.ValueTracker`
334334

335335

336-
* `#1301 <https://github.com/ManimCommunity/manim/pull/1301>`__: Added futher docstrings and typehints to :class:`~.Mobject`
336+
* `#1301 <https://github.com/ManimCommunity/manim/pull/1301>`__: Added further docstrings and typehints to :class:`~.Mobject`
337337

338338

339339
* `#1298 <https://github.com/ManimCommunity/manim/pull/1298>`__: Add double backquotes for rst code samples (value_tracker.py)

docs/source/contributing/documentation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Here is the syntax:
6868

6969
* ``.. manim:: [SCENE_NAME]`` has no indentation and ``SCENE_NAME`` refers to the name of the class below.
7070

71-
* The flags are followed in the next line (no blank line here!), with the indention level of one tab.
71+
* The flags are followed in the next line (no blank line here!), with the indentation level of one tab.
7272

7373
All possible flags can be found at :mod:`~.manim_directive`.
7474

docs/source/examples.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ Animations
144144
theta_tracker.get_value() * DEGREES, about_point=rotation_center
145145
)
146146
a = Angle(line1, line_moving, radius=0.5, other_angle=False)
147-
te = MathTex(r"\theta").move_to(
147+
tex = MathTex(r"\theta").move_to(
148148
Angle(
149149
line1, line_moving, radius=0.5 + 3 * SMALL_BUFF, other_angle=False
150150
).point_from_proportion(0.5)
151151
)
152152

153-
self.add(line1, line_moving, a, te)
153+
self.add(line1, line_moving, a, tex)
154154
self.wait()
155155

156156
line_moving.add_updater(
@@ -162,7 +162,7 @@ Animations
162162
a.add_updater(
163163
lambda x: x.become(Angle(line1, line_moving, radius=0.5, other_angle=False))
164164
)
165-
te.add_updater(
165+
tex.add_updater(
166166
lambda x: x.move_to(
167167
Angle(
168168
line1, line_moving, radius=0.5 + 3 * SMALL_BUFF, other_angle=False
@@ -172,7 +172,7 @@ Animations
172172

173173
self.play(theta_tracker.animate.set_value(40))
174174
self.play(theta_tracker.animate.increment_value(140))
175-
self.play(te.animate.set_color(RED), run_time=0.5)
175+
self.play(tex.animate.set_color(RED), run_time=0.5)
176176
self.play(theta_tracker.animate.set_value(350))
177177

178178
.. tip::

docs/source/installation/plugins.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Enabling plugins through ``manim.cfg``
7272
[CLI]
7373
plugins = manim_rubikscube
7474
75-
For specifing multiple plugins, command separated values must be used.
75+
For specifying multiple plugins, command separated values must be used.
7676

7777
.. code-block:: ini
7878

docs/source/installation/troubleshooting.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ can help in identifying what version of manim files are written for:
3535
+--------------+-------------------------+----------------------------+-----------------------------------------+
3636

3737
If you are a beginner, you should only attempt to run files written for
38-
your version. Files written for a different version of manim wil
38+
your version. Files written for a different version of manim will
3939
generally not work without some modification.
4040

4141
Identifying the version you are running

docs/source/installation/win.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Windows
22
=======
33

4-
There are two simple ways to download manim's depedencies, using the popular package
4+
There are two simple ways to download manim's dependencies, using the popular package
55
managers `Scoop <https://scoop.sh>`_ and `Chocolatey <https://chocolatey.org/install>`_
66

77
.. _scoop:

manim/_config/default.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ disable_caching = False
118118
# --tex_template
119119
tex_template =
120120

121-
# specify the plugins as comma seperated values
121+
# specify the plugins as comma separated values
122122
# manim will load that plugin if it specified here.
123123
plugins =
124124

manim/_config/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class ManimConfig(MutableMapping):
215215
216216
manim scene.py -c BLUE
217217
218-
will set the background color to BLUE, regardless of the conents of
218+
will set the background color to BLUE, regardless of the contents of
219219
``manim.cfg``.
220220
221221
Finally, any programmatic changes made within the scene script itself will

manim/animation/animation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def interpolate_submobject(
294294
self,
295295
submobject: Mobject,
296296
starting_submobject: Mobject,
297-
# target_copy: Mobject, #Todo: fix - signature of interpolate_submobject differes in Transform().
297+
# target_copy: Mobject, #Todo: fix - signature of interpolate_submobject differs in Transform().
298298
alpha: float,
299299
) -> "Animation":
300300
# Typically implemented by subclass
@@ -386,7 +386,7 @@ def get_rate_func(
386386
Returns
387387
-------
388388
Callable[[float], float]
389-
The rate fucntion of the animation.
389+
The rate function of the animation.
390390
"""
391391
return self.rate_func
392392

manim/animation/fading.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ class _Fade(Transform):
4646
mobjects
4747
The mobjects to be faded.
4848
shift
49-
The vector by which the mobject shifts while beeing faded.
49+
The vector by which the mobject shifts while being faded.
5050
target_position
51-
The position to/from which the mobject moves while beeing faded in. In case
51+
The position to/from which the mobject moves while being faded in. In case
5252
another mobject is given as target position, its center is used.
5353
scale
54-
The factor by which the mobject is scaled initially before beeing rescaling to
55-
its original size while beeing faded in.
54+
The factor by which the mobject is scaled initially before being rescaling to
55+
its original size while being faded in.
5656
5757
"""
5858

@@ -113,13 +113,13 @@ class FadeIn(_Fade):
113113
mobjects
114114
The mobjects to be faded in.
115115
shift
116-
The vector by which the mobject shifts while beeing faded in.
116+
The vector by which the mobject shifts while being faded in.
117117
target_position
118-
The position from which the mobject starts while beeing faded in. In case
118+
The position from which the mobject starts while being faded in. In case
119119
another mobject is given as target position, its center is used.
120120
scale
121-
The factor by which the mobject is scaled initially before beeing rescaling to
122-
its original size while beeing faded in.
121+
The factor by which the mobject is scaled initially before being rescaling to
122+
its original size while being faded in.
123123
124124
Examples
125125
--------
@@ -158,12 +158,12 @@ class FadeOut(_Fade):
158158
mobjects
159159
The mobjects to be faded out.
160160
shift
161-
The vector by which the mobject shifts while beeing faded out.
161+
The vector by which the mobject shifts while being faded out.
162162
target_position
163-
The position to which the mobject moves while beeing faded out. In case another
163+
The position to which the mobject moves while being faded out. In case another
164164
mobject is given as target position, its center is used.
165165
scale
166-
The factor by which the mobject is scaled while beeing faded out.
166+
The factor by which the mobject is scaled while being faded out.
167167
168168
Examples
169169
--------

manim/animation/indication.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def create_starting_mobject(self) -> "Dot":
130130

131131

132132
class Indicate(Transform):
133-
"""Indicate a Mobject by temporaly resizing and recoloring it.
133+
"""Indicate a Mobject by temporarily resizing and recoloring it.
134134
135135
Parameters
136136
----------
@@ -519,7 +519,7 @@ def wave(t):
519519
# either rises to one or goes down to zero. Consecutive ripples will have
520520
# their amplitudes in oppising directions (first ripple from 0 to 1 to 0,
521521
# second from 0 to -1 to 0 and so on). This is how two ripples would be
522-
# devided into phases:
522+
# divided into phases:
523523

524524
# ####|#### | |
525525
# ## | ## | |
@@ -529,8 +529,8 @@ def wave(t):
529529
# | | ## | ##
530530
# | | ####|####
531531

532-
# However, this looks weired in the middle between two ripples. Therefor the
533-
# middle phases do acutally use only one appropriately scaled version of the
532+
# However, this looks weird in the middle between two ripples. Therefore the
533+
# middle phases do actually use only one appropriately scaled version of the
534534
# rate like this:
535535

536536
# 1 / 4 Time | 2 / 4 Time | 1 / 4 Time
@@ -555,7 +555,7 @@ def wave(t):
555555
# First rising ripple
556556
return wave_func(t * phases)
557557
elif phase == phases - 1:
558-
# last ripple. Rising or falling depening on the number of ripples
558+
# last ripple. Rising or falling depending on the number of ripples
559559
# The (ripples % 2)-term is used to make this destinction.
560560
t -= phase / phases # Time relative to the phase
561561
return (1 - wave_func(t * phases)) * (2 * (ripples % 2) - 1)
@@ -588,7 +588,7 @@ class Wiggle(Animation):
588588
mobject : Mobject
589589
The mobject to wiggle.
590590
scale_value
591-
The factor by which the mobject will be temporarilly scaled.
591+
The factor by which the mobject will be temporarily scaled.
592592
rotation_angle
593593
The wiggle angle.
594594
n_wiggles

manim/camera/camera.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def apply_stroke(self, ctx, vmobject, background=False):
741741
return self
742742

743743
def get_stroke_rgbas(self, vmobject, background=False):
744-
"""Get's the RGBA array for the stroke of the passed
744+
"""Gets the RGBA array for the stroke of the passed
745745
VMobject.
746746
747747
Parameters
@@ -1145,7 +1145,7 @@ def get_coords_of_all_pixels(self):
11451145
return centered_space_coords
11461146

11471147

1148-
# NOTE: The methods of the following class have not been mentioned outside of their definitons.
1148+
# NOTE: The methods of the following class have not been mentioned outside of their definitions.
11491149
# Their DocStrings are not as detailed as preferred.
11501150
class BackgroundColoredVMobjectDisplayer:
11511151
def __init__(self, camera):

manim/cli/cfg/group.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def write(level: str = None, openfile: bool = False) -> None:
160160

161161
for key in default:
162162
# All the cfg entries for logger need to be validated as styles,
163-
# as long as they arent setting the log width or height etc
163+
# as long as they aren't setting the log width or height etc
164164
if category == "logger" and key not in RICH_NON_STYLE_ENTRIES:
165165
desc = "style"
166166
style = default[key]

manim/cli/new/group.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def scene(**args):
140140
FILE is the name of file in which the SCENE will be inserted.
141141
"""
142142
if not Path("main.py").exists():
143-
raise FileNotFoundError(f"{Path('main.py')} : Not a valid project direcotory.")
143+
raise FileNotFoundError(f"{Path('main.py')} : Not a valid project directory.")
144144

145145
template_name = click.prompt(
146146
"template",

manim/mobject/geometry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ class Triangle(RegularPolygon):
21752175
Parameters
21762176
----------
21772177
kwargs : Any
2178-
Additonal arguments to be passed to :class:`RegularPolygon`
2178+
Additional arguments to be passed to :class:`RegularPolygon`
21792179
21802180
Examples
21812181
--------

manim/mobject/matrix.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def __init__(
9090
h_buff : :class:`float`, optional
9191
horizontal buffer, by default 1.3
9292
bracket_h_buff : :class:`float`, optional
93-
bracket horizonal buffer, by default MED_SMALL_BUFF
93+
bracket horizontal buffer, by default MED_SMALL_BUFF
9494
bracket_v_buff : :class:`float`, optional
95-
bracket veritical buffer, by default MED_SMALL_BUFF
95+
bracket vertical buffer, by default MED_SMALL_BUFF
9696
add_background_rectangles_to_entries : :class:`bool`, optional
9797
`True` if should add backgraound rectangles to entries, by default False
9898
include_background_rectangle : :class:`bool`, optional

manim/mobject/mobject.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ def add_updater(
883883
index
884884
The index at which the new updater should be added in ``self.updaters``. In case ``index`` is ``None`` the updater will be added at the end.
885885
call_updater
886-
Wheather or not to call the updater initially. If ``True``, the updater will be called using ``dt=0``.
886+
Whether or not to call the updater initially. If ``True``, the updater will be called using ``dt=0``.
887887
888888
Returns
889889
-------

manim/mobject/opengl_mobject.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ def point_from_proportion(self, alpha):
11801180
return interpolate(points[i], points[i + 1], subalpha)
11811181

11821182
def pfp(self, alpha):
1183-
"""Abbreviation fo point_from_proportion"""
1183+
"""Abbreviation for point_from_proportion"""
11841184
return self.point_from_proportion(alpha)
11851185

11861186
def get_pieces(self, n_pieces):
@@ -1365,7 +1365,7 @@ def pointwise_become_partial(self, mobject, a, b):
13651365

13661366
def become(self, mobject):
13671367
"""
1368-
Edit all data and submobjects to be idential
1368+
Edit all data and submobjects to be identical
13691369
to another mobject
13701370
"""
13711371
self.align_family(mobject)
@@ -1522,7 +1522,7 @@ def get_shader_wrapper_list(self):
15221522
return result
15231523

15241524
def check_data_alignment(self, array, data_key):
1525-
# Makes sure that self.data[key] can be brodcast into
1525+
# Makes sure that self.data[key] can be broadcast into
15261526
# the given array, meaning its length has to be either 1
15271527
# or the length of the array
15281528
d_len = len(self.data[data_key])

manim/mobject/polyhedra.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ class Polyhedron(VGroup):
1919
"""An abstract polyhedra class.
2020
2121
In this implementation, polyhedra are defined with a list of vertex coordinates in space, and a list
22-
of faces. This implementataion mirrors that of a standard polyhedral data format (OFF, object file format).
22+
of faces. This implementation mirrors that of a standard polyhedral data format (OFF, object file format).
2323
2424
Parameters
2525
----------
2626
vertex_coords
2727
A list of coordinates of the corresponding vertices in the polyhedron. Each coordinate will correspond to
2828
a vertex. The vertices are indexed with the usual indexing of Python.
2929
faces_list
30-
A list of faces. Each face is a sublist containing the indicies of the vertices that form the corners of that face.
30+
A list of faces. Each face is a sublist containing the indices of the vertices that form the corners of that face.
3131
faces_config
3232
Configuration for the polygons representing the faces of the polyhedron.
3333
graph_config

0 commit comments

Comments
 (0)