Cleanup: declare __all__ for Python scripts

Declare all to make public public API's explicit and
help detect unused code.
This commit is contained in:
Campbell Barton
2025-01-06 16:45:36 +11:00
parent 6ac52551d3
commit 4f1817cc18
31 changed files with 285 additions and 140 deletions

View File

@@ -2,6 +2,10 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
__all__ = (
"main",
)
r"""
Example usage:

View File

@@ -7,6 +7,10 @@
#
# only error checked for here is a segfault.
__all__ = (
"main",
)
import bpy
import sys

View File

@@ -82,7 +82,9 @@ or the context for executing the actions is not properly set (the case for timer
This utility executes actions as if the user initiated them from a key shortcut.
"""
__all__ = (
"main",
)
import os
import sys

View File

@@ -39,6 +39,10 @@ WAYLAND Environment Variables:
Currently only WAYLAND is supported, other systems could be added.
"""
__all__ = (
"main",
)
import subprocess
import sys
import signal