mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Removed unused type ignore statements and ignored all files with type errors (#4583)
This commit is contained in:
parent
97d3f3e774
commit
84870ed0a9
4 changed files with 85 additions and 58 deletions
|
|
@ -35,12 +35,12 @@ class UpdateFromFunc(Animation):
|
|||
self.update_function = update_function
|
||||
|
||||
def interpolate(self, alpha: float) -> None:
|
||||
self.update_function(self.mobject) # type: ignore[arg-type]
|
||||
self.update_function(self.mobject)
|
||||
|
||||
|
||||
class UpdateFromAlphaFunc(UpdateFromFunc):
|
||||
def interpolate(self, alpha: float) -> None:
|
||||
self.update_function(self.mobject, self.rate_func(alpha)) # type: ignore[call-arg, arg-type]
|
||||
self.update_function(self.mobject, self.rate_func(alpha)) # type: ignore[call-arg]
|
||||
|
||||
|
||||
class MaintainPositionRelativeTo(Animation):
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ class OpenGLRenderer(Renderer, RendererProtocol):
|
|||
format_ = gl.detect_format(self.render_texture_program, frame_data.dtype.names)
|
||||
vao = self.ctx.vertex_array(
|
||||
program=self.render_texture_program,
|
||||
content=[(vbo, format_, *frame_data.dtype.names)], # type: ignore
|
||||
content=[(vbo, format_, *frame_data.dtype.names)],
|
||||
)
|
||||
self.ctx.copy_framebuffer(self.render_target_texture_fbo, self.color_buffer_fbo)
|
||||
self.render_target_texture.use(0)
|
||||
|
|
@ -343,9 +343,9 @@ class OpenGLRenderer(Renderer, RendererProtocol):
|
|||
self.render_target_fbo.use()
|
||||
# Setting camera uniforms
|
||||
|
||||
self.ctx.enable(gl.BLEND) # type: ignore
|
||||
self.ctx.enable(gl.BLEND)
|
||||
# TODO: Because the Triangulation is messing up the normals this won't work
|
||||
self.ctx.blend_func = ( # type: ignore
|
||||
self.ctx.blend_func = (
|
||||
gl.SRC_ALPHA,
|
||||
gl.ONE_MINUS_SRC_ALPHA,
|
||||
gl.ONE,
|
||||
|
|
@ -354,9 +354,9 @@ class OpenGLRenderer(Renderer, RendererProtocol):
|
|||
|
||||
def enable_depth(sub):
|
||||
if sub.depth_test:
|
||||
self.ctx.enable(gl.DEPTH_TEST) # type: ignore
|
||||
self.ctx.enable(gl.DEPTH_TEST)
|
||||
else:
|
||||
self.ctx.disable(gl.DEPTH_TEST) # type: ignore
|
||||
self.ctx.disable(gl.DEPTH_TEST)
|
||||
|
||||
for sub in mob.family_members_with_points():
|
||||
# TODO: review this renderer data optimization attempt
|
||||
|
|
@ -448,7 +448,7 @@ class OpenGLRenderer(Renderer, RendererProtocol):
|
|||
buf = np.frombuffer(raw, dtype=np.uint8).reshape((x, y, 4))
|
||||
# this actually has the right type (uint8) but due to
|
||||
# numpy typing being bad, we have to type: ignore it
|
||||
return buf[::-1] # type: ignore
|
||||
return buf[::-1]
|
||||
|
||||
def release(self) -> None:
|
||||
self.ctx.release()
|
||||
|
|
@ -509,7 +509,7 @@ class GLVMobjectManager:
|
|||
inner_verts = points[inner_vert_indices]
|
||||
inner_tri_indices = inner_vert_indices[
|
||||
earclip_triangulation(inner_verts, rings)
|
||||
] # type: ignore
|
||||
]
|
||||
|
||||
tri_indices = np.hstack([indices, inner_tri_indices])
|
||||
smob.triangulation = tri_indices
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class ZoomedScene(MovingCameraScene):
|
|||
of the zoomed camera.
|
||||
"""
|
||||
self.zoom_activated = True
|
||||
self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display) # type: ignore[union-attr]
|
||||
self.renderer.camera.add_image_mobject_from_camera(self.zoomed_display)
|
||||
if animate:
|
||||
self.play(self.get_zoom_in_animation())
|
||||
self.play(self.get_zoomed_display_pop_out_animation())
|
||||
|
|
|
|||
169
mypy.ini
169
mypy.ini
|
|
@ -52,25 +52,34 @@ warn_return_any = True
|
|||
#
|
||||
# disable_recursive_aliases = True
|
||||
|
||||
[mypy-manim.__main__]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim._config.utils]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim._config.cli_colors]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.animation]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.changing]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.composition]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.creation]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.fading]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.growing]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.indication]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.specialized]
|
||||
[mypy-manim.animation.movement]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.numbers]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.animation.speedmodifier]
|
||||
|
|
@ -88,36 +97,66 @@ ignore_errors = True
|
|||
[mypy-manim.camera.camera]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.camera.mapping_camera]
|
||||
[mypy-manim.cli.checkhealth.commands]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.cli.default_group]
|
||||
[mypy-manim.manager]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.boolean_ops]
|
||||
[mypy-manim.mobject.frame]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.arc]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.labeled]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.line]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.polygram]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.geometry.shape_matchers]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.coordinate_systems]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.number_line]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.probability]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graph]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.logo]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.matrix]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.dot_cloud]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_compatibility]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_geometry]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_image_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_point_cloud_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
|
|
@ -127,9 +166,33 @@ ignore_errors = True
|
|||
[mypy-manim.mobject.opengl.opengl_vectorized_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.shader]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.svg.brace]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.svg.svg_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.table]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.text.code_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.text.tex_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.text.text_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.three_d.polyhedra]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.three_d.three_dimensions]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.types.image_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
|
|
@ -142,92 +205,52 @@ ignore_errors = True
|
|||
[mypy-manim.mobject.vector_field]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.buffers.buffer]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.cairo_renderer]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.opengl_renderer]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.opengl_shader_program]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.shader_wrapper]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.scene.three_d_scene]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.hashing]
|
||||
ignore_errors = True
|
||||
|
||||
# Added temporarily due to current mypy failures
|
||||
[mypy-manim.camera.three_d_camera]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.functions]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.number_line]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.probability]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.graphing.scale]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.matrix]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_geometry]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.opengl.opengl_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.svg.brace]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.svg.svg_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.text.code_mobject]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.three_d.polyhedra]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.three_d.three_d_utils]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.mobject.three_d.three_dimensions]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.shader]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.renderer.vectorized_mobject_rendering]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.scene.scene]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.scene.scene_file_writer]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.scene.vector_space_scene]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.bezier]
|
||||
[mypy-manim.scene.zoomed_scene]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.caching]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.color.core]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.commands]
|
||||
[mypy-manim.utils.debug]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.images]
|
||||
[mypy-manim.utils.directories]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.iterables]
|
||||
[mypy-manim.utils.family_ops]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.opengl]
|
||||
[mypy-manim.utils.hashing]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.paths]
|
||||
[mypy-manim.utils.progressbar]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.space_ops]
|
||||
|
|
@ -236,6 +259,10 @@ ignore_errors = True
|
|||
[mypy-manim.utils.testing._test_class_makers]
|
||||
ignore_errors = True
|
||||
|
||||
[mypy-manim.utils.testing.frames_comparison]
|
||||
ignore_errors = True
|
||||
|
||||
|
||||
|
||||
# ---------------- Stubless imported Modules --------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue