diff --git a/tools/check_blender_release/check_module_enabled.py b/tools/check_blender_release/check_module_enabled.py index faee14b2b00..09cb5e8db52 100644 --- a/tools/check_blender_release/check_module_enabled.py +++ b/tools/check_blender_release/check_module_enabled.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import unittest from check_utils import ( diff --git a/tools/check_blender_release/check_module_numpy.py b/tools/check_blender_release/check_module_numpy.py index 2b748bafa4f..3c0d437fddb 100644 --- a/tools/check_blender_release/check_module_numpy.py +++ b/tools/check_blender_release/check_module_numpy.py @@ -2,6 +2,9 @@ # SPDX-FileCopyrightText: 2023 Blender Authors # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) import unittest diff --git a/tools/check_blender_release/check_module_requests.py b/tools/check_blender_release/check_module_requests.py index 6d3b3b95d26..3688edaca74 100644 --- a/tools/check_blender_release/check_module_requests.py +++ b/tools/check_blender_release/check_module_requests.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import unittest from check_utils import ( diff --git a/tools/check_blender_release/check_release.py b/tools/check_blender_release/check_release.py index cd4358c00fb..263ff9a448b 100755 --- a/tools/check_blender_release/check_release.py +++ b/tools/check_blender_release/check_release.py @@ -4,6 +4,9 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Usage: ./check_release.py -- ../path/to/release/folder +__all__ = ( + "main", +) import unittest diff --git a/tools/check_blender_release/check_static_binaries.py b/tools/check_blender_release/check_static_binaries.py index f567c88a6c3..1ed26045d9c 100644 --- a/tools/check_blender_release/check_static_binaries.py +++ b/tools/check_blender_release/check_static_binaries.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import os from pathlib import Path import re diff --git a/tools/check_blender_release/check_utils.py b/tools/check_blender_release/check_utils.py index 7ce9d3993a9..ac6c6d9549f 100644 --- a/tools/check_blender_release/check_utils.py +++ b/tools/check_blender_release/check_utils.py @@ -3,6 +3,11 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "ScriptUnitTesting", + "parseArguments", + "sliceCommandLineArguments", +) import unittest diff --git a/tools/check_docs/check_docs_code_layout.py b/tools/check_docs/check_docs_code_layout.py index 93f62f7f303..b7e3cee6c31 100644 --- a/tools/check_docs/check_docs_code_layout.py +++ b/tools/check_docs/check_docs_code_layout.py @@ -14,6 +14,9 @@ You may pass the markdown text as an argument, e.g. check_docs_code_layout.py --markdown=markdown.txt """ +__all__ = ( + "main", +) import os import argparse diff --git a/tools/check_source/check_cmake_consistency_config.py b/tools/check_source/check_cmake_consistency_config.py index b844430f33b..fee35ad9fe4 100644 --- a/tools/check_source/check_cmake_consistency_config.py +++ b/tools/check_source/check_cmake_consistency_config.py @@ -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 = ( diff --git a/tools/check_source/check_deprecated.py b/tools/check_source/check_deprecated.py index 2f0a8896db0..fb8a4a3a19e 100644 --- a/tools/check_source/check_deprecated.py +++ b/tools/check_source/check_deprecated.py @@ -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 diff --git a/tools/check_source/check_descriptions.py b/tools/check_source/check_descriptions.py index e83d1a48515..10aacd3a9d1 100644 --- a/tools/check_source/check_descriptions.py +++ b/tools/check_source/check_descriptions.py @@ -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 diff --git a/tools/check_source/check_header_duplicate.py b/tools/check_source/check_header_duplicate.py index b599f5e9c31..4273140bf88 100755 --- a/tools/check_source/check_header_duplicate.py +++ b/tools/check_source/check_header_duplicate.py @@ -14,6 +14,9 @@ Then restore the headers to their original state: python3 check_header_duplicate.py --restore """ +__all__ = ( + "main", +) import os import sys diff --git a/tools/check_source/check_licenses.py b/tools/check_source/check_licenses.py index 69310d9f98a..88ae17912be 100644 --- a/tools/check_source/check_licenses.py +++ b/tools/check_source/check_licenses.py @@ -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 diff --git a/tools/check_source/check_mypy.py b/tools/check_source/check_mypy.py index 98d8e942dd6..a0e90d331cc 100755 --- a/tools/check_source/check_mypy.py +++ b/tools/check_source/check_mypy.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import os from os.path import join diff --git a/tools/check_source/check_mypy_config.py b/tools/check_source/check_mypy_config.py index 2bdee0a795a..57c8b2b06ce 100644 --- a/tools/check_source/check_mypy_config.py +++ b/tools/check_source/check_mypy_config.py @@ -2,6 +2,12 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "PATHS", + "PATHS_EXCLUDE", + "SOURCE_DIR", +) + import os from typing import ( Any, diff --git a/tools/check_source/check_spelling.py b/tools/check_source/check_spelling.py index 88659c9f953..b794b55167c 100755 --- a/tools/check_source/check_spelling.py +++ b/tools/check_source/check_spelling.py @@ -13,6 +13,9 @@ Script for checking source code spelling. Currently only python source is checked. """ +__all__ = ( + "main", +) import os import argparse diff --git a/tools/check_source/check_spelling_config.py b/tools/check_source/check_spelling_config.py index dd22ac3a67f..0fb0af3eff7 100644 --- a/tools/check_source/check_spelling_config.py +++ b/tools/check_source/check_spelling_config.py @@ -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`. diff --git a/tools/check_source/check_unused_defines.py b/tools/check_source/check_unused_defines.py index 9ddd5116da1..137be5c442f 100755 --- a/tools/check_source/check_unused_defines.py +++ b/tools/check_source/check_unused_defines.py @@ -5,6 +5,10 @@ # Checks for defines which aren't used anywhere. +__all__ = ( + "main", +) + import os import sys diff --git a/tools/check_source/clang_array_check.py b/tools/check_source/clang_array_check.py index 44831417def..804a83efd20 100644 --- a/tools/check_source/clang_array_check.py +++ b/tools/check_source/clang_array_check.py @@ -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) diff --git a/tools/check_source/static_check_clang.py b/tools/check_source/static_check_clang.py index c5b73e4b86e..8d88a46f037 100644 --- a/tools/check_source/static_check_clang.py +++ b/tools/check_source/static_check_clang.py @@ -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 diff --git a/tools/check_source/static_check_clang_array.py b/tools/check_source/static_check_clang_array.py index 13a833efe80..6c3eb25313b 100644 --- a/tools/check_source/static_check_clang_array.py +++ b/tools/check_source/static_check_clang_array.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import project_source_info import subprocess import sys diff --git a/tools/check_source/static_check_cppcheck.py b/tools/check_source/static_check_cppcheck.py index c6bcac0c467..dd7d0d5df2f 100644 --- a/tools/check_source/static_check_cppcheck.py +++ b/tools/check_source/static_check_cppcheck.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import project_source_info import subprocess import sys diff --git a/tools/debug/gdb/blender_gdb_extension.py b/tools/debug/gdb/blender_gdb_extension.py index bf34d439fe0..59cfe4dd570 100644 --- a/tools/debug/gdb/blender_gdb_extension.py +++ b/tools/debug/gdb/blender_gdb_extension.py @@ -21,6 +21,11 @@ To validate that things are registered correctly: 3. Run `info frame-filter` and check for `blender-frame-filters`. ''' +__all__ = ( + # Not used externally but functions as a `main`. + "register", +) + import gdb import functools from contextlib import contextmanager @@ -675,4 +680,5 @@ def register(): gdb.frame_filters[frame_filter.name] = frame_filter -register() +if __name__ == "__main__": + register() diff --git a/tools/git/git_sort_commits.py b/tools/git/git_sort_commits.py index 341622b28ea..d128fb22827 100755 --- a/tools/git/git_sort_commits.py +++ b/tools/git/git_sort_commits.py @@ -12,6 +12,10 @@ Example: git_sort_commits.py < commits.txt """ +__all__ = ( + "main", +) + import sys import os diff --git a/tools/modules/blendfile.py b/tools/modules/blendfile.py index 1166a6c345c..32c12f67f4b 100644 --- a/tools/modules/blendfile.py +++ b/tools/modules/blendfile.py @@ -10,6 +10,15 @@ # and https://pypi.org/project/blender-asset-tracer/ # ----------------------------------------------------------------------------- +__all__ = ( + "open_blend", + + # Expose for `wrapper_type` argument to `open_blend`. + "BlendFile", + "BlendFileRaw", +) + + import gzip import logging import os diff --git a/tools/triage/gitea_utils.py b/tools/triage/gitea_utils.py index 9e5a0cb8d9f..74fbdb196c2 100644 --- a/tools/triage/gitea_utils.py +++ b/tools/triage/gitea_utils.py @@ -5,6 +5,15 @@ # Simple module for inspecting GITEA users, pulls and issues. +__all__ = ( + "git_username_detect", + "gitea_json_activities_get", + "gitea_json_issue_events_filter", + "gitea_json_issue_get", + "gitea_json_issues_search", + "gitea_user_get", +) + import datetime import json import urllib.error diff --git a/tools/triage/issues_module_listing.py b/tools/triage/issues_module_listing.py index 990d2452d0b..3926f81d445 100755 --- a/tools/triage/issues_module_listing.py +++ b/tools/triage/issues_module_listing.py @@ -10,6 +10,9 @@ Example usage: python ./issues_module_listing.py --severity High """ +__all__ = ( + "main", +) import argparse import dataclasses diff --git a/tools/triage/issues_needing_info.py b/tools/triage/issues_needing_info.py index 3bfba16c4be..728ec98ec2c 100755 --- a/tools/triage/issues_needing_info.py +++ b/tools/triage/issues_needing_info.py @@ -12,6 +12,9 @@ Example usage: python ./issues_needing_info.py --username mano-wii """ +__all__ = ( + "main", +) import argparse import datetime diff --git a/tools/triage/weekly_report.py b/tools/triage/weekly_report.py index 70e79afca96..8b4714e21f6 100755 --- a/tools/triage/weekly_report.py +++ b/tools/triage/weekly_report.py @@ -15,6 +15,10 @@ Example usage: python ./weekly_report.py --username mano-wii """ +__all__ = ( + "main", +) + import argparse import datetime diff --git a/tools/utils/addr2line_backtrace.py b/tools/utils/addr2line_backtrace.py index 58b367ae863..a15db1ced5b 100755 --- a/tools/utils/addr2line_backtrace.py +++ b/tools/utils/addr2line_backtrace.py @@ -16,6 +16,9 @@ Piping from the standard-input is also supported: The text is printed to the standard output. """ +__all__ = ( + "main", +) import argparse import multiprocessing diff --git a/tools/utils/authors_git_gen.py b/tools/utils/authors_git_gen.py index 2793e29e6a3..10f23a5d69d 100755 --- a/tools/utils/authors_git_gen.py +++ b/tools/utils/authors_git_gen.py @@ -13,6 +13,10 @@ Example use a custom range: authors_git_gen.py --source=/src/blender --range=SHA1..HEAD """ +__all__ = ( + "main", +) + # NOTE: this shares the basic structure with `credits_git_gen.py`, # however details differ enough for them to be separate scripts. # Improvements to this script may apply there too. diff --git a/tools/utils/autopep8_clean.py b/tools/utils/autopep8_clean.py index 30c26a8b041..396d292aaa9 100755 --- a/tools/utils/autopep8_clean.py +++ b/tools/utils/autopep8_clean.py @@ -3,6 +3,11 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + + import subprocess import os from os.path import join diff --git a/tools/utils/autopep8_clean_config.py b/tools/utils/autopep8_clean_config.py index 2ef97cac868..5c0919eb11e 100644 --- a/tools/utils/autopep8_clean_config.py +++ b/tools/utils/autopep8_clean_config.py @@ -2,6 +2,12 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "PATHS", + "PATHS_EXCLUDE", + "SOURCE_DIR", +) + import os from collections.abc import ( diff --git a/tools/utils/blend2json.py b/tools/utils/blend2json.py index f01aa5dc23d..aad638e3223 100755 --- a/tools/utils/blend2json.py +++ b/tools/utils/blend2json.py @@ -32,6 +32,10 @@ To check a .blend file instead of outputting its JSon version (use explicit -o o ./blend2json.py -c foo.blend """ +__all__ = ( + "main", +) + FILTER_DOC = """ Each generic filter is made of three arguments, the include/exclude toggle ('+'/'-'), a regex to match against the name diff --git a/tools/utils/blender_keyconfig_export_permutations.py b/tools/utils/blender_keyconfig_export_permutations.py index 53364a1926e..70850200a74 100755 --- a/tools/utils/blender_keyconfig_export_permutations.py +++ b/tools/utils/blender_keyconfig_export_permutations.py @@ -28,6 +28,9 @@ config = [ ("rmb_action", ('TWEAK', 'FALLBACK_TOOL')), ] """ +__all__ = ( + "main", +) import os import sys diff --git a/tools/utils/blender_merge_format_changes.py b/tools/utils/blender_merge_format_changes.py index 65d669e5d18..306d5cf5ccf 100755 --- a/tools/utils/blender_merge_format_changes.py +++ b/tools/utils/blender_merge_format_changes.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import os import subprocess import sys diff --git a/tools/utils/blender_theme_as_c.py b/tools/utils/blender_theme_as_c.py index 16537f95881..a1f457043de 100755 --- a/tools/utils/blender_theme_as_c.py +++ b/tools/utils/blender_theme_as_c.py @@ -16,6 +16,10 @@ eg: ./tools/utils/blender_theme_as_c.py $(find ~/.config/blender -name "userpref.blend" | sort | tail -1) """ +__all__ = ( + "main", +) + C_SOURCE_HEADER = r'''/* SPDX-FileCopyrightText: 2018 Blender Authors * diff --git a/tools/utils/credits_git_gen.py b/tools/utils/credits_git_gen.py index d4bc97d62bf..2a75da1a3c1 100755 --- a/tools/utils/credits_git_gen.py +++ b/tools/utils/credits_git_gen.py @@ -12,6 +12,10 @@ Example use a custom range: credits_git_gen.py --source=/src/blender --range=SHA1..HEAD """ +__all__ = ( + "main", +) + # NOTE: this shares the basic structure with `credits_git_gen.py`, # however details differ enough for them to be separate scripts. diff --git a/tools/utils/cycles_timeit.py b/tools/utils/cycles_timeit.py index 1ca4daa8f16..af0c3e39e12 100755 --- a/tools/utils/cycles_timeit.py +++ b/tools/utils/cycles_timeit.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import argparse import re import shutil diff --git a/tools/utils/gdb_struct_repr_c99.py b/tools/utils/gdb_struct_repr_c99.py index d93124d1f03..c2207d9b01a 100644 --- a/tools/utils/gdb_struct_repr_c99.py +++ b/tools/utils/gdb_struct_repr_c99.py @@ -11,6 +11,11 @@ Example use: (gdb) source tools/utils/gdb_struct_repr_c99.py (gdb) print_struct_c99 scene->toolsettings ''' +__all__ = ( + "main", +) + +import sys class PrintStructC99(gdb.Command): @@ -46,10 +51,16 @@ class PrintStructC99(gdb.Command): print(' ' * hs + '.' + rr_s[0] + '= ' + rr_rval) -print('Running GDB from: {:s}\n'.format(gdb.PYTHONDIR)) -gdb.execute("set print pretty") -gdb.execute('set pagination off') -gdb.execute('set print repeats 0') -gdb.execute('set print elements unlimited') -# instantiate -PrintStructC99() +def main() -> int: + print('Running GDB from: {:s}\n'.format(gdb.PYTHONDIR)) + gdb.execute("set print pretty") + gdb.execute('set pagination off') + gdb.execute('set print repeats 0') + gdb.execute('set print elements unlimited') + # instantiate + PrintStructC99() + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/utils/git_log.py b/tools/utils/git_log.py index 50853cc7d9b..d91366644d0 100644 --- a/tools/utils/git_log.py +++ b/tools/utils/git_log.py @@ -4,6 +4,13 @@ # Simple module for inspecting git commits +__all__ = ( + "GitCommit", + "GitCommitIter", + "GitRepo", +) + + import os import subprocess import datetime diff --git a/tools/utils/git_log_review_commits.py b/tools/utils/git_log_review_commits.py index 43d24fb63f1..354f81bd47b 100755 --- a/tools/utils/git_log_review_commits.py +++ b/tools/utils/git_log_review_commits.py @@ -12,6 +12,9 @@ Example usage: ./git_log_review_commits.py --source=../../.. --range=HEAD~40..HEAD --filter=BUGFIX """ +__all__ = ( + "main", +) class _Getch: diff --git a/tools/utils/git_log_review_commits_advanced.py b/tools/utils/git_log_review_commits_advanced.py index e01b5d77ec1..05e3f4ac784 100755 --- a/tools/utils/git_log_review_commits_advanced.py +++ b/tools/utils/git_log_review_commits_advanced.py @@ -29,6 +29,10 @@ To exclude all commits from some given files, by sha1 or by commit message (from """ +__all__ = ( + "main", +) + import os import sys import io diff --git a/tools/utils/gitea_inactive_developers.py b/tools/utils/gitea_inactive_developers.py index ce74d948b48..d9cad4cdf55 100755 --- a/tools/utils/gitea_inactive_developers.py +++ b/tools/utils/gitea_inactive_developers.py @@ -11,6 +11,10 @@ # * 403 Client Error: That means the token doesn't have the right scope. # * 500 Server Error: The token is invalid. +__all__ = ( + "main", +) + import logging import os import requests diff --git a/tools/utils/make_cursor_gui.py b/tools/utils/make_cursor_gui.py index 8001e69dc14..0d2c0e1bd52 100755 --- a/tools/utils/make_cursor_gui.py +++ b/tools/utils/make_cursor_gui.py @@ -6,6 +6,10 @@ # Created by Robert Wenzlaff (Det. Thorn). # Oct. 30, 2003 +__all__ = ( + "main", +) + import sys from tkinter import ( Button, diff --git a/tools/utils/make_gl_stipple_from_xpm.py b/tools/utils/make_gl_stipple_from_xpm.py index 9910dc4db0a..1f80705abd1 100644 --- a/tools/utils/make_gl_stipple_from_xpm.py +++ b/tools/utils/make_gl_stipple_from_xpm.py @@ -4,6 +4,9 @@ # Converts 32x32 XPM images written be the gimp to GL stipples # takes XPM files as arguments, prints out C style definitions. +__all__ = ( + "main", +) import sys import os diff --git a/tools/utils/make_shape_2d_from_blend.py b/tools/utils/make_shape_2d_from_blend.py index 3b3387fee09..9c708671114 100644 --- a/tools/utils/make_shape_2d_from_blend.py +++ b/tools/utils/make_shape_2d_from_blend.py @@ -17,6 +17,10 @@ Example Use:: blender.bin -b --factory-startup my_shapes.blend --python make_shape_2d_from_blend.py ''' +__all__ = ( + "main", +) + import bpy import os diff --git a/tools/utils_api/bpy_introspect_ui.py b/tools/utils_api/bpy_introspect_ui.py index df7c89491c3..5ecf48db00b 100644 --- a/tools/utils_api/bpy_introspect_ui.py +++ b/tools/utils_api/bpy_introspect_ui.py @@ -12,6 +12,10 @@ Example usage: python3 tools/utils_api/bpy_introspect_ui.py """ +__all__ = ( + "main", +) + import sys ModuleType = type(sys) diff --git a/tools/utils_build/wheel_cleanup.py b/tools/utils_build/wheel_cleanup.py index 3cd02197056..a1b3cb6cd1c 100755 --- a/tools/utils_build/wheel_cleanup.py +++ b/tools/utils_build/wheel_cleanup.py @@ -21,6 +21,10 @@ Usage: wheel_cleanup.py """ +__all__ = ( + "main", +) + import argparse import re import shutil diff --git a/tools/utils_doc/rna_manual_reference_updater.py b/tools/utils_doc/rna_manual_reference_updater.py index 8ea6e792fc3..a2c963ad00a 100644 --- a/tools/utils_doc/rna_manual_reference_updater.py +++ b/tools/utils_doc/rna_manual_reference_updater.py @@ -28,6 +28,10 @@ or added to the Blender UI translation table. URL is the: url_manual_prefix + url_manual_mapping[#id] ''' +__all__ = ( + "main", +) + import os import argparse diff --git a/tools/utils_maintenance/autopep8_format_paths.py b/tools/utils_maintenance/autopep8_format_paths.py index 976bf266599..877d1ec3c45 100755 --- a/tools/utils_maintenance/autopep8_format_paths.py +++ b/tools/utils_maintenance/autopep8_format_paths.py @@ -15,6 +15,10 @@ Otherwise you may call this script directly, for example: ./tools/utils_maintenance/autopep8_format_paths.py --changed-only tests/python """ +__all__ = ( + "main", +) + import os import sys diff --git a/tools/utils_maintenance/blender_menu_search_coverage.py b/tools/utils_maintenance/blender_menu_search_coverage.py index 8e3c5f00d54..051a754aefa 100644 --- a/tools/utils_maintenance/blender_menu_search_coverage.py +++ b/tools/utils_maintenance/blender_menu_search_coverage.py @@ -8,6 +8,10 @@ # --enable-event-simulate \ # --python tools/utils_maintenance/blender_menu_search_coverage.py +__all__ = ( + "main", +) + import bpy # Menu-ID -> class. diff --git a/tools/utils_maintenance/blender_update_themes.py b/tools/utils_maintenance/blender_update_themes.py index 371307a4a09..4c5229c35b1 100644 --- a/tools/utils_maintenance/blender_update_themes.py +++ b/tools/utils_maintenance/blender_update_themes.py @@ -6,6 +6,10 @@ # # ./blender.bin --background --python ./tools/utils_maintenance/blender_update_themes.py +__all__ = ( + "main", +) + import bpy import os diff --git a/tools/utils_maintenance/c_sort_blocks.py b/tools/utils_maintenance/c_sort_blocks.py index 2304a94a194..183eb2ac202 100755 --- a/tools/utils_maintenance/c_sort_blocks.py +++ b/tools/utils_maintenance/c_sort_blocks.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import os import sys diff --git a/tools/utils_maintenance/c_struct_clean.py b/tools/utils_maintenance/c_struct_clean.py index 6f1d1e05c3a..88bced94fa7 100755 --- a/tools/utils_maintenance/c_struct_clean.py +++ b/tools/utils_maintenance/c_struct_clean.py @@ -11,6 +11,10 @@ There may be times this is needed, however they can typically be removed and any errors caused can be added to the headers which require the forward declarations. """ +__all__ = ( + "main", +) + import os import sys import re diff --git a/tools/utils_maintenance/clang_format_paths.py b/tools/utils_maintenance/clang_format_paths.py index db763459d43..8bf22b1c98a 100755 --- a/tools/utils_maintenance/clang_format_paths.py +++ b/tools/utils_maintenance/clang_format_paths.py @@ -11,6 +11,9 @@ While it can be called directly, you may prefer to run this from Blender's root make format """ +__all__ = ( + "main", +) import argparse import multiprocessing diff --git a/tools/utils_maintenance/cmake_sort_filelists.py b/tools/utils_maintenance/cmake_sort_filelists.py index 483dea94ee7..5d030a819b5 100755 --- a/tools/utils_maintenance/cmake_sort_filelists.py +++ b/tools/utils_maintenance/cmake_sort_filelists.py @@ -8,6 +8,9 @@ Sorts CMake path lists - Don't cross blank newline boundaries. - Don't cross different path prefix boundaries. """ +__all__ = ( + "main", +) import os import sys diff --git a/tools/utils_maintenance/code_clean.py b/tools/utils_maintenance/code_clean.py index 1ff237f6f90..3caf0790827 100755 --- a/tools/utils_maintenance/code_clean.py +++ b/tools/utils_maintenance/code_clean.py @@ -11,6 +11,10 @@ Note: currently this is limited to paths in "source/" and "intern/", we could change this if it's needed. """ +__all__ = ( + "main", +) + import argparse import re import subprocess diff --git a/tools/utils_maintenance/make_license.py b/tools/utils_maintenance/make_license.py index 0d67babb060..bf09b976b02 100644 --- a/tools/utils_maintenance/make_license.py +++ b/tools/utils_maintenance/make_license.py @@ -3,6 +3,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later # pylint: disable=missing-function-docstring, missing-module-docstring, missing-class-docstring +__all__ = ( + "main", +) + import datetime import itertools import json diff --git a/tools/utils_maintenance/modules/batch_edit_text.py b/tools/utils_maintenance/modules/batch_edit_text.py index 401476d63ae..6ec80ecb86f 100644 --- a/tools/utils_maintenance/modules/batch_edit_text.py +++ b/tools/utils_maintenance/modules/batch_edit_text.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "run", +) + from collections.abc import ( Callable, Iterator, diff --git a/tools/utils_maintenance/trailing_space_clean.py b/tools/utils_maintenance/trailing_space_clean.py index c19af7205d7..549f4469ec0 100755 --- a/tools/utils_maintenance/trailing_space_clean.py +++ b/tools/utils_maintenance/trailing_space_clean.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "main", +) + import os from os.path import join diff --git a/tools/utils_maintenance/trailing_space_clean_config.py b/tools/utils_maintenance/trailing_space_clean_config.py index a9e876c7eaf..98114c95153 100644 --- a/tools/utils_maintenance/trailing_space_clean_config.py +++ b/tools/utils_maintenance/trailing_space_clean_config.py @@ -2,6 +2,12 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +__all__ = ( + "PATHS", + "SOURCE_DIR", +) + + import os PATHS = ( "build_files/build_environment/cmake",