Skip to content

Commit 9a98d67

Browse files
GameDungeonpre-commit-ci[bot]Darylgolden
authored
LGTM Error Fix (#2001)
* LGTM Error Crush * I'm dumb * fix * Update manim/plugins/import_plugins.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Darylgolden <[email protected]>
1 parent 0976f23 commit 9a98d67

File tree

12 files changed

+16
-22
lines changed

12 files changed

+16
-22
lines changed

lgtm.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
queries:
2+
- exclude: py/init-calls-subclass
3+
- exclude: py/unexpected-raise-in-special-method
4+
- exclude: py/modification-of-locals
5+
- exclude: py/multiple-calls-to-init
6+
- exclude: py/missing-call-to-init

manim/_config/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,7 @@ def quality(self):
11021102
for qual in constants.QUALITIES:
11031103
if all([q[k] == constants.QUALITIES[qual][k] for k in keys]):
11041104
return qual
1105-
else:
1106-
return None
1105+
return None
11071106

11081107
@quality.setter
11091108
def quality(self, qual: str) -> None:

manim/camera/camera.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ def type_or_raise(self, mobject):
187187
for _type in self.display_funcs:
188188
if isinstance(mobject, _type):
189189
return _type
190-
else:
191-
raise TypeError(f"Displaying an object of class {_type} is not supported")
190+
raise TypeError(f"Displaying an object of class {_type} is not supported")
192191

193192
def reset_pixel_shape(self, new_height, new_width):
194193
"""This method resets the height and width

manim/camera/mapping_camera.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def __init__(
3333
def points_to_pixel_coords(self, points):
3434
return super().points_to_pixel_coords(
3535
np.apply_along_axis(self.mapping_func, 1, points),
36-
)
36+
) # TODO: There is an error here, but I don't know how to fix it:
37+
# FIXME: Call to method Camera.points_to_pixel_coords with too few arguments; should be no fewer than 3.
3738

3839
def capture_mobjects(self, mobjects, **kwargs):
3940
mobjects = self.get_mobjects_to_display(mobjects, **kwargs)

manim/cli/cfg/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def write(level: str = None, openfile: bool = False) -> None:
200200
end="",
201201
)
202202
temp = input()
203-
else:
204-
default[key] = temp
203+
204+
default[key] = temp
205205

206206
default = replace_keys(default) if category == "logger" else default
207207

manim/mobject/changing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from typing import Callable, Optional
66

7-
import numpy as np
87
from colour import Color
98

109
from .._config import config

manim/mobject/mobject.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@
4646
from ..utils.iterables import list_update, remove_list_redundancies
4747
from ..utils.paths import straight_path
4848
from ..utils.simple_functions import get_parameters
49-
from ..utils.space_ops import (
50-
angle_between_vectors,
51-
normalize,
52-
rotation_matrix,
53-
rotation_matrix_transpose,
54-
)
49+
from ..utils.space_ops import angle_between_vectors, normalize, rotation_matrix
5550
from .opengl_compatibility import ConvertToOpenGL
5651

5752
# TODO: Explain array_attrs

manim/mobject/opengl_three_dimensions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import math
2-
31
import numpy as np
42

53
from ..constants import *

manim/mobject/svg/opengl_tex_mobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def construct(self):
180180
OpenGLVGroup,
181181
)
182182
from ...utils.color import BLACK
183-
from ...utils.deprecation import deprecated
184183
from ...utils.strings import split_string_list_to_isolate_substrings
185184
from ...utils.tex_file_writing import tex_to_svg_file
186185
from .style_utils import parse_style

manim/mobject/svg/tex_mobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
from ...mobject.types.vectorized_mobject import VectorizedPoint, VGroup
3737
from ...utils.color import BLACK, WHITE
3838
from ...utils.deprecation import deprecated_params
39-
from ...utils.tex import TexTemplate
4039
from ...utils.tex_file_writing import tex_to_svg_file
4140
from .style_utils import parse_style
4241

manim/plugins/import_plugins.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
exec(f"{lst.__name__}=lst")
3838
__all__.append(lst.__name__)
3939
plugins_requested.remove(plugin.name)
40-
else:
41-
if plugins_requested != []:
42-
logger.warning("Missing Plugins: %s", plugins_requested)
40+
41+
if plugins_requested != []:
42+
logger.warning("Missing Plugins: %s", plugins_requested)

scripts/dev_changelog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import re
4949
from collections import defaultdict
5050
from pathlib import Path
51-
from posixpath import dirname
5251
from textwrap import dedent, indent
5352

5453
import click

0 commit comments

Comments
 (0)