mypy: add 3 scripts to the "make check_mypy" config
This commit is contained in:
@@ -148,7 +148,7 @@ def keymap_item_property_clean(value: Any) -> Any:
|
|||||||
# Convert to `dict` to de-duplicate.
|
# Convert to `dict` to de-duplicate.
|
||||||
dict([(k, keymap_item_property_clean(v)) for k, v in value]).items(),
|
dict([(k, keymap_item_property_clean(v)) for k, v in value]).items(),
|
||||||
# Ignore type checking, these are strings which we know can be sorted.
|
# Ignore type checking, these are strings which we know can be sorted.
|
||||||
key=lambda item: item[0], # type: ignore
|
key=lambda item: item[0],
|
||||||
)
|
)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
@@ -271,8 +271,7 @@ def main() -> None:
|
|||||||
relaxed = "--relaxed" in argv
|
relaxed = "--relaxed" in argv
|
||||||
|
|
||||||
# NOTE(@ideasman42): Disable add-on items as they may cause differences in the key-map.
|
# NOTE(@ideasman42): Disable add-on items as they may cause differences in the key-map.
|
||||||
import addon_utils
|
__import__("addon_utils").disable_all()
|
||||||
addon_utils.disable_all()
|
|
||||||
|
|
||||||
has_error = False
|
has_error = False
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ from typing import (
|
|||||||
Any,
|
Any,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# - Most tests in `tests/python` use `bpy` enough that it's simpler to list the scripts that *are* type checked.
|
||||||
PATHS: tuple[tuple[str, tuple[Any, ...], dict[str, str]], ...] = (
|
PATHS: tuple[tuple[str, tuple[Any, ...], dict[str, str]], ...] = (
|
||||||
("build_files/cmake/", (), {'MYPYPATH': "modules"}),
|
("build_files/cmake/", (), {'MYPYPATH': "modules"}),
|
||||||
("build_files/utils/", (), {'MYPYPATH': "modules"}),
|
("build_files/utils/", (), {'MYPYPATH': "modules"}),
|
||||||
@@ -16,6 +18,8 @@ PATHS: tuple[tuple[str, tuple[Any, ...], dict[str, str]], ...] = (
|
|||||||
("scripts/modules/_bpy_internal/extensions/wheel_manager.py", (), {}),
|
("scripts/modules/_bpy_internal/extensions/wheel_manager.py", (), {}),
|
||||||
("scripts/modules/_bpy_internal/freedesktop.py", (), {}),
|
("scripts/modules/_bpy_internal/freedesktop.py", (), {}),
|
||||||
("source/blender/nodes/intern/discover_nodes.py", (), {}),
|
("source/blender/nodes/intern/discover_nodes.py", (), {}),
|
||||||
|
("tests/python/bl_keymap_validate.py", (), {}),
|
||||||
|
("tests/utils/blender_headless.py", (), {}),
|
||||||
("tools/check_blender_release/", (), {}),
|
("tools/check_blender_release/", (), {}),
|
||||||
("tools/check_docs/", (), {}),
|
("tools/check_docs/", (), {}),
|
||||||
("tools/check_source/", (), {'MYPYPATH': "modules"}),
|
("tools/check_source/", (), {'MYPYPATH': "modules"}),
|
||||||
@@ -61,7 +65,6 @@ PATHS_EXCLUDE = set(
|
|||||||
"tools/utils/gdb_struct_repr_c99.py",
|
"tools/utils/gdb_struct_repr_c99.py",
|
||||||
"tools/utils/git_log_review_commits.py",
|
"tools/utils/git_log_review_commits.py",
|
||||||
"tools/utils/git_log_review_commits_advanced.py",
|
"tools/utils/git_log_review_commits_advanced.py",
|
||||||
"tools/utils/gitea_inactive_developers.py",
|
|
||||||
"tools/utils/make_cursor_gui.py",
|
"tools/utils/make_cursor_gui.py",
|
||||||
"tools/utils/make_gl_stipple_from_xpm.py",
|
"tools/utils/make_gl_stipple_from_xpm.py",
|
||||||
"tools/utils/make_shape_2d_from_blend.py",
|
"tools/utils/make_shape_2d_from_blend.py",
|
||||||
|
|||||||
Reference in New Issue
Block a user