Cleanup: declare __all__ for many scripts in tools/
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
__all__ = (
|
||||
"BUILD_DIR",
|
||||
"IGNORE_CMAKE",
|
||||
"IGNORE_SOURCE",
|
||||
"IGNORE_SOURCE_MISSING",
|
||||
"SOURCE_DIR",
|
||||
"UTF8_CHECK",
|
||||
)
|
||||
|
||||
import os
|
||||
|
||||
IGNORE_SOURCE = (
|
||||
|
||||
@@ -8,6 +8,10 @@ noted by the date which must be included with the *DEPRECATED* comment.
|
||||
|
||||
Once this date is past, the code should be removed.
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
import datetime
|
||||
|
||||
@@ -8,6 +8,9 @@ this script updates XML themes once new settings are added
|
||||
|
||||
./blender.bin --background --python tools/check_source/check_descriptions.py
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ Then restore the headers to their original state:
|
||||
|
||||
python3 check_header_duplicate.py --restore
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -9,6 +9,10 @@ https://spdx.org/licenses/
|
||||
|
||||
This can be activated by calling "make check_licenses" from Blenders root directory.
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import os
|
||||
from os.path import join
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
__all__ = (
|
||||
"PATHS",
|
||||
"PATHS_EXCLUDE",
|
||||
"SOURCE_DIR",
|
||||
)
|
||||
|
||||
import os
|
||||
from typing import (
|
||||
Any,
|
||||
|
||||
@@ -13,6 +13,9 @@ Script for checking source code spelling.
|
||||
|
||||
Currently only python source is checked.
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
||||
@@ -4,6 +4,15 @@
|
||||
|
||||
# these must be all lower case for comparisons
|
||||
|
||||
__all__ = (
|
||||
"dict_custom",
|
||||
"dict_ignore",
|
||||
"dict_ignore_hyphenated_prefix",
|
||||
"dict_ignore_hyphenated_suffix",
|
||||
"directories_ignore",
|
||||
"files_ignore",
|
||||
)
|
||||
|
||||
dict_custom = {
|
||||
# Added to newer versions of the dictionary,
|
||||
# we can remove these when the updated word-lists have been applied to `aspell-en`.
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
# Checks for defines which aren't used anywhere.
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
@@ -13,6 +13,11 @@ Invocation:
|
||||
... defines and includes are optional
|
||||
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import sys
|
||||
|
||||
# delay parsing functions until we need them
|
||||
USE_LAZY_INIT = True
|
||||
@@ -380,9 +385,15 @@ def recursive_arg_sizes(node, ):
|
||||
recursive_arg_sizes(c)
|
||||
|
||||
|
||||
# cache function sizes
|
||||
recursive_arg_sizes(tu.cursor)
|
||||
_defs.update(defs_precalc)
|
||||
def main() -> int:
|
||||
# cache function sizes
|
||||
recursive_arg_sizes(tu.cursor)
|
||||
_defs.update(defs_precalc)
|
||||
|
||||
# --- second pass, check against def's
|
||||
file_check_arg_sizes(tu)
|
||||
# --- second pass, check against def's
|
||||
file_check_arg_sizes(tu)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main)
|
||||
|
||||
@@ -13,6 +13,10 @@ cd {BUILD_DIR}
|
||||
python ../blender/tools/check_source/static_check_clang.py --match=".*" --checks=struct_comments
|
||||
|
||||
"""
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
||||
import project_source_info
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
Reference in New Issue
Block a user