mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* Add type annotations to `mobject.py` * More work on type annotations for mobject.py * ... * Almost handled all mypy errors * Add the mypy error messages to the lines that trigger them * Use typing.cast to avoid some mypy errors, as suggested by JasonGrace2282 * Used the ruff linter * Fixed one typing issue and added the error descriptions to the source code for the remaning 10 errors * Set the type of the elements in a VGroup to VMobject * Use typing.cast to handle some specific cases. * Code cleaning * Updates * When started to use typing.cast it is needed to import / define certain elements during runtime and not only during type checking * Fix bug introduced with the type annotations. * Made it work again * .. * Fixed more issues. * Code cleanup * Code cleanup. Replace self.lines with self.lines_chars and self.lines_alignment. * Handle slicing when accessing elements inside a VGroup * Fix missing issues. * Silence the last mypy error * Make _Updater, _NonTimeBasedUpdater and _TimeBasedUpdater private. * Replace | with Union[...] in one location * Move import of Union * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove comment that is no longer relevant * Overload the auto_zoom method in MovingCamera to provide better type hinting * Codecleanup * Code cleanup * Renamed lines_alignment to lines_alignments and added a TODO about a future cleanup task * More code cleanup * Update manim/mobject/matrix.py Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Addressing multiple comments from Chopan50 * Implementing more suggestions from Chopan50 * More suggestions by Chopan50 * ... * More renaming and code cleanup, as suggested by Chopan50 * Restructure code * anim_args * Update typing in vector_space_scene * Implemented a number of suggestions from chopan50 * Make a list of faces with the type list[ThreeDVMobject] * Ensure to return a VGroup if slicing is used. * Revert back to the original code in text_mobject.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add the propagate_colors option to Mobject as it is used by VMobject. Replace Self with _UpdateBuilder * Simplify code --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
167 lines
3.5 KiB
INI
167 lines
3.5 KiB
INI
[mypy]
|
|
strict = False
|
|
files = manim
|
|
python_version = 3.11
|
|
; plugins = numpy.typing.mypy_plugin
|
|
ignore_errors = False
|
|
cache_fine_grained = True
|
|
|
|
# Apparently mypy cannot understand the difference between methods and callable attributes.
|
|
# See https://github.com/python/mypy/issues/2427#issuecomment-929688736
|
|
# and https://github.com/python/mypy/issues/2427#issuecomment-1419206807
|
|
disable_error_code = method-assign
|
|
|
|
# Disallow Dynamic Typing
|
|
# disallow_any_unimported = True
|
|
# disallow_any_expr = False
|
|
# disallow_any_decorated = True
|
|
# disallow_any_explicit = True
|
|
# disallow_any_generics = True
|
|
# disallow_subclassing_any = True
|
|
#
|
|
# # Disallow Untyped Defs and Calls
|
|
disallow_untyped_calls = True
|
|
disallow_untyped_defs = True
|
|
disallow_incomplete_defs = True
|
|
# check_untyped_defs = False
|
|
# disallow_untyped_decorators = True
|
|
#
|
|
# # None and Optional Handling
|
|
# implicit_optional = False
|
|
# strict_optional = True
|
|
#
|
|
# # Configuring Warnings
|
|
# warn_redundant_casts = True
|
|
warn_unused_ignores = True
|
|
warn_return_any = True
|
|
# warn_unreachable = True
|
|
#
|
|
# # Strictness Flags
|
|
# allow_untyped_globals = False
|
|
# allow_redefinition = False
|
|
# local_partial_types = False
|
|
# strict_equality = True
|
|
#
|
|
# # Configuring Error Messages
|
|
# show_error_context = True
|
|
# show_column_numbers = True
|
|
# show_error_codes = True
|
|
# pretty = True
|
|
# color_output = True
|
|
# error_summary = True
|
|
#
|
|
# disable_recursive_aliases = True
|
|
|
|
[mypy-manim._config.utils]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.animation]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.creation]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.speedmodifier]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.transform_matching_parts]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.transform]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.animation.updaters.mobject_update_utils]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.camera.mapping_camera]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.graphing.coordinate_systems]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.graph]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.logo]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.opengl.opengl_point_cloud_mobject]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.opengl.opengl_surface]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.opengl.opengl_vectorized_mobject]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.table]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.types.point_cloud_mobject]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.types.vectorized_mobject]
|
|
ignore_errors = True
|
|
|
|
[mypy-manim.mobject.vector_field]
|
|
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
|
|
|
|
|
|
|
|
# ---------------- Stubless imported Modules --------------------------
|
|
|
|
# We should be able to create stubs for this or type hint it
|
|
[mypy-manimpango]
|
|
ignore_missing_imports = True
|
|
|
|
# Has stubs in 3.8
|
|
[mypy-pydub]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-matplotlib]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-scipy.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-networkx]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-git]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-moderngl.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-moderngl_window.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-dearpygui.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-screeninfo]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-IPython.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-watchdog.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-tqdm]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-mapbox_earcut]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-click_default_group]
|
|
ignore_missing_imports = True
|