From 9f9ee0c813443333a49c797083ff456629c009fb Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Tue, 11 Jun 2024 15:19:07 -0500 Subject: [PATCH] SCons: Add unobtrusive type hints in SCons files --- SConstruct | 1 + core/SCsub | 1 + core/config/SCsub | 1 + core/crypto/SCsub | 1 + core/debugger/SCsub | 1 + core/error/SCsub | 1 + core/extension/SCsub | 1 + core/input/SCsub | 1 + core/io/SCsub | 1 + core/math/SCsub | 1 + core/object/SCsub | 1 + core/os/SCsub | 1 + core/string/SCsub | 1 + core/templates/SCsub | 1 + core/variant/SCsub | 1 + drivers/SCsub | 1 + drivers/alsa/SCsub | 1 + drivers/alsamidi/SCsub | 1 + drivers/backtrace/SCsub | 1 + drivers/coreaudio/SCsub | 1 + drivers/coremidi/SCsub | 1 + drivers/d3d12/SCsub | 1 + drivers/egl/SCsub | 1 + drivers/gl_context/SCsub | 1 + drivers/gles3/SCsub | 1 + drivers/gles3/effects/SCsub | 1 + drivers/gles3/environment/SCsub | 1 + drivers/gles3/shaders/SCsub | 1 + drivers/gles3/shaders/effects/SCsub | 1 + drivers/gles3/storage/SCsub | 1 + drivers/metal/SCsub | 1 + drivers/png/SCsub | 1 + drivers/pulseaudio/SCsub | 1 + drivers/unix/SCsub | 1 + drivers/vulkan/SCsub | 1 + drivers/wasapi/SCsub | 1 + drivers/windows/SCsub | 1 + drivers/winmidi/SCsub | 1 + drivers/xaudio2/SCsub | 1 + editor/SCsub | 1 + editor/debugger/SCsub | 1 + editor/debugger/debug_adapter/SCsub | 1 + editor/export/SCsub | 1 + editor/gui/SCsub | 1 + editor/icons/SCsub | 1 + editor/import/SCsub | 1 + editor/plugins/SCsub | 1 + editor/plugins/gizmos/SCsub | 1 + editor/plugins/tiles/SCsub | 1 + editor/project_manager/SCsub | 1 + editor/themes/SCsub | 1 + main/SCsub | 1 + misc/utility/scons_hints.py | 98 +++++++++++++++++++ modules/SCsub | 1 + modules/astcenc/SCsub | 1 + modules/basis_universal/SCsub | 1 + modules/betsy/SCsub | 4 +- modules/bmp/SCsub | 1 + modules/camera/SCsub | 1 + modules/csg/SCsub | 1 + modules/cvtt/SCsub | 1 + modules/dds/SCsub | 1 + modules/enet/SCsub | 1 + modules/etcpak/SCsub | 1 + modules/fbx/SCsub | 1 + modules/freetype/SCsub | 1 + modules/gdscript/SCsub | 1 + .../gdscript/editor/script_templates/SCsub | 1 + modules/glslang/SCsub | 1 + modules/gltf/SCsub | 1 + modules/gltf/extensions/SCsub | 1 + modules/godot_physics_2d/SCsub | 3 +- modules/godot_physics_3d/SCsub | 3 +- modules/godot_physics_3d/joints/SCsub | 3 +- modules/gridmap/SCsub | 1 + modules/hdr/SCsub | 1 + modules/interactive_music/SCsub | 1 + modules/jpg/SCsub | 1 + modules/jsonrpc/SCsub | 1 + modules/ktx/SCsub | 1 + modules/lightmapper_rd/SCsub | 1 + modules/mbedtls/SCsub | 1 + modules/meshoptimizer/SCsub | 1 + modules/minimp3/SCsub | 1 + modules/mobile_vr/SCsub | 1 + modules/mono/SCsub | 1 + modules/mono/editor/script_templates/SCsub | 1 + modules/msdfgen/SCsub | 1 + modules/multiplayer/SCsub | 1 + modules/navigation/SCsub | 1 + modules/noise/SCsub | 1 + modules/ogg/SCsub | 1 + modules/openxr/SCsub | 1 + modules/openxr/action_map/SCsub | 1 + modules/openxr/editor/SCsub | 1 + modules/openxr/extensions/SCsub | 1 + modules/openxr/scene/SCsub | 1 + modules/raycast/SCsub | 1 + modules/regex/SCsub | 1 + modules/squish/SCsub | 1 + modules/svg/SCsub | 1 + modules/text_server_adv/SCsub | 1 + .../gdextension_build/SConstruct | 2 + modules/text_server_fb/SCsub | 1 + .../gdextension_build/SConstruct | 2 + modules/tga/SCsub | 1 + modules/theora/SCsub | 1 + modules/tinyexr/SCsub | 1 + modules/upnp/SCsub | 1 + modules/vhacd/SCsub | 1 + modules/vorbis/SCsub | 1 + modules/webp/SCsub | 1 + modules/webrtc/SCsub | 1 + modules/websocket/SCsub | 1 + modules/webxr/SCsub | 1 + modules/xatlas_unwrap/SCsub | 1 + modules/zip/SCsub | 1 + platform/SCsub | 1 + platform/android/SCsub | 1 + platform/ios/SCsub | 1 + platform/linuxbsd/SCsub | 1 + platform/linuxbsd/wayland/SCsub | 1 + platform/linuxbsd/x11/SCsub | 1 + platform/macos/SCsub | 1 + platform/web/SCsub | 1 + platform/windows/SCsub | 1 + pyproject.toml | 14 ++- scene/2d/SCsub | 1 + scene/2d/physics/SCsub | 1 + scene/2d/physics/joints/SCsub | 1 + scene/3d/SCsub | 1 + scene/3d/physics/SCsub | 1 + scene/3d/physics/joints/SCsub | 1 + scene/SCsub | 1 + scene/animation/SCsub | 1 + scene/audio/SCsub | 1 + scene/debugger/SCsub | 1 + scene/gui/SCsub | 1 + scene/main/SCsub | 1 + scene/resources/2d/SCsub | 1 + scene/resources/3d/SCsub | 1 + scene/resources/SCsub | 1 + scene/theme/SCsub | 1 + scene/theme/icons/SCsub | 1 + servers/SCsub | 1 + servers/audio/SCsub | 1 + servers/audio/effects/SCsub | 1 + servers/camera/SCsub | 1 + servers/debugger/SCsub | 1 + servers/display/SCsub | 1 + servers/extensions/SCsub | 1 + servers/movie_writer/SCsub | 1 + servers/navigation/SCsub | 1 + servers/rendering/SCsub | 1 + servers/rendering/dummy/SCsub | 1 + servers/rendering/dummy/storage/SCsub | 1 + servers/rendering/renderer_rd/SCsub | 1 + servers/rendering/renderer_rd/effects/SCsub | 1 + .../rendering/renderer_rd/environment/SCsub | 1 + .../renderer_rd/forward_clustered/SCsub | 1 + .../renderer_rd/forward_mobile/SCsub | 1 + servers/rendering/renderer_rd/shaders/SCsub | 1 + .../renderer_rd/shaders/effects/SCsub | 1 + .../renderer_rd/shaders/effects/fsr2/SCsub | 1 + .../renderer_rd/shaders/environment/SCsub | 1 + .../shaders/forward_clustered/SCsub | 1 + .../renderer_rd/shaders/forward_mobile/SCsub | 1 + .../rendering/renderer_rd/spirv-reflect/SCsub | 1 + .../rendering/renderer_rd/storage_rd/SCsub | 1 + servers/rendering/storage/SCsub | 1 + servers/text/SCsub | 1 + servers/xr/SCsub | 1 + tests/SCsub | 3 +- 173 files changed, 290 insertions(+), 6 deletions(-) create mode 100644 misc/utility/scons_hints.py diff --git a/SConstruct b/SConstruct index 0245531b45e2..5566770148be 100644 --- a/SConstruct +++ b/SConstruct @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * EnsureSConsVersion(3, 1, 2) EnsurePythonVersion(3, 6) diff --git a/core/SCsub b/core/SCsub index c8267ae96002..8bda230b870c 100644 --- a/core/SCsub +++ b/core/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/config/SCsub b/core/config/SCsub index bf702854905f..1417a258c1a7 100644 --- a/core/config/SCsub +++ b/core/config/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/crypto/SCsub b/core/crypto/SCsub index 8cff3cf679cb..3cea6bfb4711 100644 --- a/core/crypto/SCsub +++ b/core/crypto/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/debugger/SCsub b/core/debugger/SCsub index 19a65492252d..ab811758940f 100644 --- a/core/debugger/SCsub +++ b/core/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/error/SCsub b/core/error/SCsub index dfd6248a941c..08089d31b075 100644 --- a/core/error/SCsub +++ b/core/error/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/extension/SCsub b/core/extension/SCsub index 6ab2d2b0a672..8688ca5b6e7c 100644 --- a/core/extension/SCsub +++ b/core/extension/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/input/SCsub b/core/input/SCsub index d8e6f33156b2..521f7702e4e2 100644 --- a/core/input/SCsub +++ b/core/input/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/io/SCsub b/core/io/SCsub index 19a65492252d..ab811758940f 100644 --- a/core/io/SCsub +++ b/core/io/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/math/SCsub b/core/math/SCsub index c8fdac207ec7..6ea3ab6b125e 100644 --- a/core/math/SCsub +++ b/core/math/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/object/SCsub b/core/object/SCsub index 7c00bb719e3e..3d0d2c14dd27 100644 --- a/core/object/SCsub +++ b/core/object/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/os/SCsub b/core/os/SCsub index 19a65492252d..ab811758940f 100644 --- a/core/os/SCsub +++ b/core/os/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/string/SCsub b/core/string/SCsub index 3217166f18dc..b06e32eb88a8 100644 --- a/core/string/SCsub +++ b/core/string/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/templates/SCsub b/core/templates/SCsub index 8c4c843a333b..7f806d560997 100644 --- a/core/templates/SCsub +++ b/core/templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/core/variant/SCsub b/core/variant/SCsub index 7f4c8b7788b2..8264503a2296 100644 --- a/core/variant/SCsub +++ b/core/variant/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/SCsub b/drivers/SCsub index 44d29fb7c17a..219c4451eef3 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/alsa/SCsub b/drivers/alsa/SCsub index f17acb0f9161..6242d0e359e0 100644 --- a/drivers/alsa/SCsub +++ b/drivers/alsa/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/alsamidi/SCsub b/drivers/alsamidi/SCsub index 4e1b5f2a3624..69d667c57bfb 100644 --- a/drivers/alsamidi/SCsub +++ b/drivers/alsamidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/backtrace/SCsub b/drivers/backtrace/SCsub index f61fb21581b6..cc2cf0a6d8da 100644 --- a/drivers/backtrace/SCsub +++ b/drivers/backtrace/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/coreaudio/SCsub b/drivers/coreaudio/SCsub index 4e1b5f2a3624..69d667c57bfb 100644 --- a/drivers/coreaudio/SCsub +++ b/drivers/coreaudio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/coremidi/SCsub b/drivers/coremidi/SCsub index 4e1b5f2a3624..69d667c57bfb 100644 --- a/drivers/coremidi/SCsub +++ b/drivers/coremidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/d3d12/SCsub b/drivers/d3d12/SCsub index 482a5491890a..b6ceed23ac83 100644 --- a/drivers/d3d12/SCsub +++ b/drivers/d3d12/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import os from pathlib import Path diff --git a/drivers/egl/SCsub b/drivers/egl/SCsub index 1fd15b4bae6b..3a9b484b8304 100644 --- a/drivers/egl/SCsub +++ b/drivers/egl/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index ce6ea747b124..a2ba425990de 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/SCsub b/drivers/gles3/SCsub index 506312df805e..4f4b33de03a2 100644 --- a/drivers/gles3/SCsub +++ b/drivers/gles3/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/effects/SCsub b/drivers/gles3/effects/SCsub index 91e1140b750d..9ad6234fbe4b 100644 --- a/drivers/gles3/effects/SCsub +++ b/drivers/gles3/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/environment/SCsub b/drivers/gles3/environment/SCsub index 91e1140b750d..9ad6234fbe4b 100644 --- a/drivers/gles3/environment/SCsub +++ b/drivers/gles3/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub index e70912cb4d72..df2c51503500 100644 --- a/drivers/gles3/shaders/SCsub +++ b/drivers/gles3/shaders/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/shaders/effects/SCsub b/drivers/gles3/shaders/effects/SCsub index 38b185ed8856..387c317b90c0 100644 --- a/drivers/gles3/shaders/effects/SCsub +++ b/drivers/gles3/shaders/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/gles3/storage/SCsub b/drivers/gles3/storage/SCsub index 91e1140b750d..9ad6234fbe4b 100644 --- a/drivers/gles3/storage/SCsub +++ b/drivers/gles3/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/metal/SCsub b/drivers/metal/SCsub index 30129b780612..f597580763e4 100644 --- a/drivers/metal/SCsub +++ b/drivers/metal/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/png/SCsub b/drivers/png/SCsub index e38f3c47606e..fce37257b168 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/pulseaudio/SCsub b/drivers/pulseaudio/SCsub index f48489d7877b..6a76ff6d85e1 100644 --- a/drivers/pulseaudio/SCsub +++ b/drivers/pulseaudio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 146563a3b615..bca4acfd7400 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 1efef5ad7748..6ea7cc9a3b92 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/wasapi/SCsub b/drivers/wasapi/SCsub index 4e1b5f2a3624..69d667c57bfb 100644 --- a/drivers/wasapi/SCsub +++ b/drivers/wasapi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/windows/SCsub b/drivers/windows/SCsub index 91e1140b750d..9ad6234fbe4b 100644 --- a/drivers/windows/SCsub +++ b/drivers/windows/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/winmidi/SCsub b/drivers/winmidi/SCsub index 4e1b5f2a3624..69d667c57bfb 100644 --- a/drivers/winmidi/SCsub +++ b/drivers/winmidi/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/drivers/xaudio2/SCsub b/drivers/xaudio2/SCsub index 6778ad281e5d..cd210466a2a8 100644 --- a/drivers/xaudio2/SCsub +++ b/drivers/xaudio2/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/SCsub b/editor/SCsub index 029048969ad4..9fcaf6124572 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/debugger/SCsub b/editor/debugger/SCsub index 99f1c888f087..e26d09d88b13 100644 --- a/editor/debugger/SCsub +++ b/editor/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/debugger/debug_adapter/SCsub b/editor/debugger/debug_adapter/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/debugger/debug_adapter/SCsub +++ b/editor/debugger/debug_adapter/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/export/SCsub b/editor/export/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/export/SCsub +++ b/editor/export/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/gui/SCsub b/editor/gui/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/gui/SCsub +++ b/editor/gui/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 0d9ac43c4677..a66ef56699c7 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/import/SCsub b/editor/import/SCsub index a8c06cc40697..3d3b7780ba39 100644 --- a/editor/import/SCsub +++ b/editor/import/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/SCsub b/editor/plugins/SCsub index 4b6abf18f946..2d3066c7c9ee 100644 --- a/editor/plugins/SCsub +++ b/editor/plugins/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/gizmos/SCsub b/editor/plugins/gizmos/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/plugins/gizmos/SCsub +++ b/editor/plugins/gizmos/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/plugins/tiles/SCsub b/editor/plugins/tiles/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/plugins/tiles/SCsub +++ b/editor/plugins/tiles/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/project_manager/SCsub b/editor/project_manager/SCsub index 359d04e5df2a..b3cff5b9dc6f 100644 --- a/editor/project_manager/SCsub +++ b/editor/project_manager/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/editor/themes/SCsub b/editor/themes/SCsub index e8f96e429944..5a9949dfa76a 100644 --- a/editor/themes/SCsub +++ b/editor/themes/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/main/SCsub b/main/SCsub index f3807167a2a9..71bee465f598 100644 --- a/main/SCsub +++ b/main/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/misc/utility/scons_hints.py b/misc/utility/scons_hints.py new file mode 100644 index 000000000000..fe380e399da7 --- /dev/null +++ b/misc/utility/scons_hints.py @@ -0,0 +1,98 @@ +""" +Adds type hints to SCons scripts. Implemented via +`from misc.utility.scons_hints import *`. + +This is NOT a 1-1 representation of what the defines will represent in an +SCons build, as proxies are almost always utilized instead. Rather, this is +a means of tracing back what those proxies are calling to in the first place. +""" + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # ruff: noqa: F401 + from SCons.Action import Action + from SCons.Builder import Builder + from SCons.Defaults import Chmod, Copy, CScan, DefaultEnvironment, Delete, DirScanner, Mkdir, Move, Touch + from SCons.Environment import Base + from SCons.Platform import Platform + from SCons.Platform.virtualenv import Virtualenv + from SCons.Scanner import FindPathDirs, ScannerBase + from SCons.Script import ARGLIST, ARGUMENTS, BUILD_TARGETS, COMMAND_LINE_TARGETS, DEFAULT_TARGETS + from SCons.Script.Main import ( + AddOption, + BuildTask, + CleanTask, + DebugOptions, + GetBuildFailures, + GetOption, + PrintHelp, + Progress, + QuestionTask, + SetOption, + ValidateOptions, + ) + from SCons.Script.SConscript import Configure, Return, SConsEnvironment, call_stack + from SCons.Script.SConscript import SConsEnvironment as Environment + from SCons.Subst import SetAllowableExceptions as AllowSubstExceptions + from SCons.Tool import CScanner, DScanner, ProgramScanner, SourceFileScanner, Tool + from SCons.Util import AddMethod, WhereIs + from SCons.Variables import BoolVariable, EnumVariable, ListVariable, PackageVariable, PathVariable, Variables + + # Global functions + GetSConsVersion = SConsEnvironment.GetSConsVersion + EnsurePythonVersion = SConsEnvironment.EnsurePythonVersion + EnsureSConsVersion = SConsEnvironment.EnsureSConsVersion + Exit = SConsEnvironment.Exit + GetLaunchDir = SConsEnvironment.GetLaunchDir + SConscriptChdir = SConsEnvironment.SConscriptChdir + + # SConsEnvironment functions + Default = SConsEnvironment(DefaultEnvironment()).Default + Export = SConsEnvironment(DefaultEnvironment()).Export + Help = SConsEnvironment(DefaultEnvironment()).Help + Import = SConsEnvironment(DefaultEnvironment()).Import + SConscript = SConsEnvironment(DefaultEnvironment()).SConscript + + # Environment functions + AddPostAction = DefaultEnvironment().AddPostAction + AddPreAction = DefaultEnvironment().AddPreAction + Alias = DefaultEnvironment().Alias + AlwaysBuild = DefaultEnvironment().AlwaysBuild + CacheDir = DefaultEnvironment().CacheDir + Clean = DefaultEnvironment().Clean + Command = DefaultEnvironment().Command + Decider = DefaultEnvironment().Decider + Depends = DefaultEnvironment().Depends + Dir = DefaultEnvironment().Dir + Entry = DefaultEnvironment().Entry + Execute = DefaultEnvironment().Execute + File = DefaultEnvironment().File + FindFile = DefaultEnvironment().FindFile + FindInstalledFiles = DefaultEnvironment().FindInstalledFiles + FindSourceFiles = DefaultEnvironment().FindSourceFiles + Flatten = DefaultEnvironment().Flatten + GetBuildPath = DefaultEnvironment().GetBuildPath + Glob = DefaultEnvironment().Glob + Ignore = DefaultEnvironment().Ignore + Install = DefaultEnvironment().Install + InstallAs = DefaultEnvironment().InstallAs + InstallVersionedLib = DefaultEnvironment().InstallVersionedLib + Literal = DefaultEnvironment().Literal + Local = DefaultEnvironment().Local + NoCache = DefaultEnvironment().NoCache + NoClean = DefaultEnvironment().NoClean + ParseDepends = DefaultEnvironment().ParseDepends + Precious = DefaultEnvironment().Precious + PyPackageDir = DefaultEnvironment().PyPackageDir + Repository = DefaultEnvironment().Repository + Requires = DefaultEnvironment().Requires + SConsignFile = DefaultEnvironment().SConsignFile + SideEffect = DefaultEnvironment().SideEffect + Split = DefaultEnvironment().Split + Tag = DefaultEnvironment().Tag + Value = DefaultEnvironment().Value + VariantDir = DefaultEnvironment().VariantDir + + env: SConsEnvironment + env_modules: SConsEnvironment diff --git a/modules/SCsub b/modules/SCsub index e16cc17b6729..fea2f2eeb863 100644 --- a/modules/SCsub +++ b/modules/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import os diff --git a/modules/astcenc/SCsub b/modules/astcenc/SCsub index 691c74b4a746..23e9fa87fc12 100644 --- a/modules/astcenc/SCsub +++ b/modules/astcenc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/basis_universal/SCsub b/modules/basis_universal/SCsub index 80bfd7e858e8..0142317e1ef4 100644 --- a/modules/basis_universal/SCsub +++ b/modules/basis_universal/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/betsy/SCsub b/modules/betsy/SCsub index ed5dcbf58b73..2735116cc37d 100644 --- a/modules/betsy/SCsub +++ b/modules/betsy/SCsub @@ -1,4 +1,6 @@ -# !/ usr / bin / env python +#!/usr/bin/env python +from misc.utility.scons_hints import * + Import("env") Import("env_modules") diff --git a/modules/bmp/SCsub b/modules/bmp/SCsub index 9d317887c3d0..cc3684b94bb7 100644 --- a/modules/bmp/SCsub +++ b/modules/bmp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/camera/SCsub b/modules/camera/SCsub index ba7fca8794a2..aed5efd0d20e 100644 --- a/modules/camera/SCsub +++ b/modules/camera/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/csg/SCsub b/modules/csg/SCsub index 1cf9974fc138..f71618ab2212 100644 --- a/modules/csg/SCsub +++ b/modules/csg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/cvtt/SCsub b/modules/cvtt/SCsub index 1d5a7ff6a3b2..44e56ab6a770 100644 --- a/modules/cvtt/SCsub +++ b/modules/cvtt/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/dds/SCsub b/modules/dds/SCsub index 06980bd670f9..d1c67c31eae7 100644 --- a/modules/dds/SCsub +++ b/modules/dds/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/enet/SCsub b/modules/enet/SCsub index 580e5a3eb021..0c31638e46b4 100644 --- a/modules/enet/SCsub +++ b/modules/enet/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/etcpak/SCsub b/modules/etcpak/SCsub index 2d3b69be75fd..a872e1cd03ab 100644 --- a/modules/etcpak/SCsub +++ b/modules/etcpak/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/fbx/SCsub b/modules/fbx/SCsub index 6a791094c61c..6f9fbba0b468 100644 --- a/modules/fbx/SCsub +++ b/modules/fbx/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub index 2813eaecd515..5edce9668006 100644 --- a/modules/freetype/SCsub +++ b/modules/freetype/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gdscript/SCsub b/modules/gdscript/SCsub index 61accd4fc9ae..8f50bf9588ef 100644 --- a/modules/gdscript/SCsub +++ b/modules/gdscript/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gdscript/editor/script_templates/SCsub b/modules/gdscript/editor/script_templates/SCsub index 5db7e3fc3baa..28a27db3fae1 100644 --- a/modules/gdscript/editor/script_templates/SCsub +++ b/modules/gdscript/editor/script_templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub index 3068377e60ab..b6e3da2316c4 100644 --- a/modules/glslang/SCsub +++ b/modules/glslang/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gltf/SCsub b/modules/gltf/SCsub index 9d263cccacda..107511686366 100644 --- a/modules/gltf/SCsub +++ b/modules/gltf/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/gltf/extensions/SCsub b/modules/gltf/extensions/SCsub index fdf14300f17d..e403cd6fdc00 100644 --- a/modules/gltf/extensions/SCsub +++ b/modules/gltf/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/godot_physics_2d/SCsub b/modules/godot_physics_2d/SCsub index 5d93da5ecf61..39eb469978ed 100644 --- a/modules/godot_physics_2d/SCsub +++ b/modules/godot_physics_2d/SCsub @@ -1,5 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/godot_physics_3d/SCsub b/modules/godot_physics_3d/SCsub index 41a59cd24ec9..1502eb39eeae 100644 --- a/modules/godot_physics_3d/SCsub +++ b/modules/godot_physics_3d/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/godot_physics_3d/joints/SCsub b/modules/godot_physics_3d/joints/SCsub index 5d93da5ecf61..39eb469978ed 100644 --- a/modules/godot_physics_3d/joints/SCsub +++ b/modules/godot_physics_3d/joints/SCsub @@ -1,5 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * -Import('env') +Import("env") env.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/gridmap/SCsub b/modules/gridmap/SCsub index 282d77259298..d4baa9000e6f 100644 --- a/modules/gridmap/SCsub +++ b/modules/gridmap/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/hdr/SCsub b/modules/hdr/SCsub index 10629bda3c65..739b2caecf26 100644 --- a/modules/hdr/SCsub +++ b/modules/hdr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/interactive_music/SCsub b/modules/interactive_music/SCsub index 2950a30854a3..f2546747a0f0 100644 --- a/modules/interactive_music/SCsub +++ b/modules/interactive_music/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/jpg/SCsub b/modules/jpg/SCsub index b840542c1bbe..2d948d335540 100644 --- a/modules/jpg/SCsub +++ b/modules/jpg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/jsonrpc/SCsub b/modules/jsonrpc/SCsub index 8ee4f8bfea9d..923567b13889 100644 --- a/modules/jsonrpc/SCsub +++ b/modules/jsonrpc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/ktx/SCsub b/modules/ktx/SCsub index c4cb73249883..f4c394d7345e 100644 --- a/modules/ktx/SCsub +++ b/modules/ktx/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/lightmapper_rd/SCsub b/modules/lightmapper_rd/SCsub index fe9737b36f65..157381ae98bc 100644 --- a/modules/lightmapper_rd/SCsub +++ b/modules/lightmapper_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mbedtls/SCsub b/modules/mbedtls/SCsub index 90ce98c751cf..e217ca5ca471 100644 --- a/modules/mbedtls/SCsub +++ b/modules/mbedtls/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/meshoptimizer/SCsub b/modules/meshoptimizer/SCsub index 3f86bb4f000e..b335b5db3aa5 100644 --- a/modules/meshoptimizer/SCsub +++ b/modules/meshoptimizer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/minimp3/SCsub b/modules/minimp3/SCsub index 09e84f71e98b..e9491bb72ff2 100644 --- a/modules/minimp3/SCsub +++ b/modules/minimp3/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mobile_vr/SCsub b/modules/mobile_vr/SCsub index e6c43228b4c9..b237f3120947 100644 --- a/modules/mobile_vr/SCsub +++ b/modules/mobile_vr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/mono/SCsub b/modules/mono/SCsub index d267df938a0f..f74f0fb9c148 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import build_scripts.mono_configure as mono_configure diff --git a/modules/mono/editor/script_templates/SCsub b/modules/mono/editor/script_templates/SCsub index 01c293c25db8..f465374758aa 100644 --- a/modules/mono/editor/script_templates/SCsub +++ b/modules/mono/editor/script_templates/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/msdfgen/SCsub b/modules/msdfgen/SCsub index f4316a74e783..844b0980ac51 100644 --- a/modules/msdfgen/SCsub +++ b/modules/msdfgen/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/multiplayer/SCsub b/modules/multiplayer/SCsub index e89038c3e0e7..97f91c56744e 100644 --- a/modules/multiplayer/SCsub +++ b/modules/multiplayer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/navigation/SCsub b/modules/navigation/SCsub index 02d3b7487e91..ab578252c198 100644 --- a/modules/navigation/SCsub +++ b/modules/navigation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/noise/SCsub b/modules/noise/SCsub index f309fd2dd44b..dcf51b03e3e7 100644 --- a/modules/noise/SCsub +++ b/modules/noise/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub index f15525648f76..fabd4f936ac6 100644 --- a/modules/ogg/SCsub +++ b/modules/ogg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/openxr/SCsub b/modules/openxr/SCsub index 77922045ebbb..dd6a9214402b 100644 --- a/modules/openxr/SCsub +++ b/modules/openxr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/openxr/action_map/SCsub b/modules/openxr/action_map/SCsub index 7a493011ec80..d659be1d99bd 100644 --- a/modules/openxr/action_map/SCsub +++ b/modules/openxr/action_map/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/openxr/editor/SCsub b/modules/openxr/editor/SCsub index ccf67a80d060..39eb469978ed 100644 --- a/modules/openxr/editor/SCsub +++ b/modules/openxr/editor/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/modules/openxr/extensions/SCsub b/modules/openxr/extensions/SCsub index 1bd9cfaa2297..95b75ccd6528 100644 --- a/modules/openxr/extensions/SCsub +++ b/modules/openxr/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/openxr/scene/SCsub b/modules/openxr/scene/SCsub index 7a493011ec80..d659be1d99bd 100644 --- a/modules/openxr/scene/SCsub +++ b/modules/openxr/scene/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_openxr") diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub index f3a8e307630c..bbf5ff79839e 100644 --- a/modules/raycast/SCsub +++ b/modules/raycast/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/regex/SCsub b/modules/regex/SCsub index f5e2dd5dfcbe..5d70604e764a 100644 --- a/modules/regex/SCsub +++ b/modules/regex/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/squish/SCsub b/modules/squish/SCsub index c9e29911d859..d8e7fbc142b6 100644 --- a/modules/squish/SCsub +++ b/modules/squish/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/svg/SCsub b/modules/svg/SCsub index a32be0e41a4e..af8f6c14f4ed 100644 --- a/modules/svg/SCsub +++ b/modules/svg/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub index 4112b81622f4..304a09515c61 100644 --- a/modules/text_server_adv/SCsub +++ b/modules/text_server_adv/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_adv/gdextension_build/SConstruct b/modules/text_server_adv/gdextension_build/SConstruct index effed1e77246..8f4f2cba409b 100644 --- a/modules/text_server_adv/gdextension_build/SConstruct +++ b/modules/text_server_adv/gdextension_build/SConstruct @@ -1,4 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * + import atexit import sys import time diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub index fc0a8727c612..b56df192c256 100644 --- a/modules/text_server_fb/SCsub +++ b/modules/text_server_fb/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/text_server_fb/gdextension_build/SConstruct b/modules/text_server_fb/gdextension_build/SConstruct index a3c205204041..dc849d58149a 100644 --- a/modules/text_server_fb/gdextension_build/SConstruct +++ b/modules/text_server_fb/gdextension_build/SConstruct @@ -1,4 +1,6 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * + import atexit import sys import time diff --git a/modules/tga/SCsub b/modules/tga/SCsub index ccd7d2ee3750..c7f58e87f781 100644 --- a/modules/tga/SCsub +++ b/modules/tga/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/theora/SCsub b/modules/theora/SCsub index ca666050ddc2..be557c1c24c9 100644 --- a/modules/theora/SCsub +++ b/modules/theora/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/tinyexr/SCsub b/modules/tinyexr/SCsub index bf9242cc1699..434e99bf84de 100644 --- a/modules/tinyexr/SCsub +++ b/modules/tinyexr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/upnp/SCsub b/modules/upnp/SCsub index 98c03e9ee90f..6657d75caee7 100644 --- a/modules/upnp/SCsub +++ b/modules/upnp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/vhacd/SCsub b/modules/vhacd/SCsub index 1ff4122114ef..926cc5b16f41 100644 --- a/modules/vhacd/SCsub +++ b/modules/vhacd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub index 322314487f5e..f063d97fee75 100644 --- a/modules/vorbis/SCsub +++ b/modules/vorbis/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webp/SCsub b/modules/webp/SCsub index dde4450c2324..a939e2f90e78 100644 --- a/modules/webp/SCsub +++ b/modules/webp/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webrtc/SCsub b/modules/webrtc/SCsub index e315633f55b2..0c5f2c9dda4c 100644 --- a/modules/webrtc/SCsub +++ b/modules/webrtc/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub index 8b469fe5be72..acaa0d3cebea 100644 --- a/modules/websocket/SCsub +++ b/modules/websocket/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/webxr/SCsub b/modules/webxr/SCsub index 81caa4a27903..9fe4e03ea644 100644 --- a/modules/webxr/SCsub +++ b/modules/webxr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/xatlas_unwrap/SCsub b/modules/xatlas_unwrap/SCsub index aa6bdaea3349..ae82a53bd916 100644 --- a/modules/xatlas_unwrap/SCsub +++ b/modules/xatlas_unwrap/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/modules/zip/SCsub b/modules/zip/SCsub index b7710123fd62..0bab3ff5f9a0 100644 --- a/modules/zip/SCsub +++ b/modules/zip/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") Import("env_modules") diff --git a/platform/SCsub b/platform/SCsub index cdaa6074baff..7c9d07f6efdb 100644 --- a/platform/SCsub +++ b/platform/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * from glob import glob from pathlib import Path diff --git a/platform/android/SCsub b/platform/android/SCsub index 8c88b419b331..3bc895935193 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * import subprocess import sys diff --git a/platform/ios/SCsub b/platform/ios/SCsub index cff7dcc1fd10..959a657aacc2 100644 --- a/platform/ios/SCsub +++ b/platform/ios/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub index 0802b528f4b0..4def765e9c50 100644 --- a/platform/linuxbsd/SCsub +++ b/platform/linuxbsd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/wayland/SCsub b/platform/linuxbsd/wayland/SCsub index 89b586845cea..1a8e243728bb 100644 --- a/platform/linuxbsd/wayland/SCsub +++ b/platform/linuxbsd/wayland/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/linuxbsd/x11/SCsub b/platform/linuxbsd/x11/SCsub index 75fe584ad58c..b76b98447f92 100644 --- a/platform/linuxbsd/x11/SCsub +++ b/platform/linuxbsd/x11/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/macos/SCsub b/platform/macos/SCsub index a10262c524e6..3924e79fb69c 100644 --- a/platform/macos/SCsub +++ b/platform/macos/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/platform/web/SCsub b/platform/web/SCsub index e81f2ec51600..b30bf20f26c1 100644 --- a/platform/web/SCsub +++ b/platform/web/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * from methods import print_error diff --git a/platform/windows/SCsub b/platform/windows/SCsub index f8ed8b73f58a..1d17e7b32511 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/pyproject.toml b/pyproject.toml index 78c8d8c20edb..a4bfd278161c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,19 @@ extend-select = [ [tool.ruff.lint.per-file-ignores] "{SConstruct,SCsub}" = [ "E402", # Module level import not at top of file - "F821", # Undefined name + "F403", # Undefined local with import star + "F405", # Undefined local with import star usage +] + +[tool.ruff.lint.isort] +sections = { metadata = ["misc.utility.scons_hints"] } +section-order = [ + "future", + "metadata", + "standard-library", + "third-party", + "first-party", + "local-folder", ] [tool.codespell] diff --git a/scene/2d/SCsub b/scene/2d/SCsub index 94e1ab6c9670..6f6bf9818cc7 100644 --- a/scene/2d/SCsub +++ b/scene/2d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/2d/physics/SCsub b/scene/2d/physics/SCsub index e7fd3fe64350..5f9747514a07 100644 --- a/scene/2d/physics/SCsub +++ b/scene/2d/physics/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/2d/physics/joints/SCsub b/scene/2d/physics/joints/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/2d/physics/joints/SCsub +++ b/scene/2d/physics/joints/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/SCsub b/scene/3d/SCsub index 94e1ab6c9670..6f6bf9818cc7 100644 --- a/scene/3d/SCsub +++ b/scene/3d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/physics/SCsub b/scene/3d/physics/SCsub index e7fd3fe64350..5f9747514a07 100644 --- a/scene/3d/physics/SCsub +++ b/scene/3d/physics/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/3d/physics/joints/SCsub b/scene/3d/physics/joints/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/3d/physics/joints/SCsub +++ b/scene/3d/physics/joints/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/SCsub b/scene/SCsub index b4b2d6dd0a42..1eb4ffa53d16 100644 --- a/scene/SCsub +++ b/scene/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/animation/SCsub b/scene/animation/SCsub index d0aa0bc8aa65..dd2b22c2e338 100644 --- a/scene/animation/SCsub +++ b/scene/animation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/audio/SCsub b/scene/audio/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/audio/SCsub +++ b/scene/audio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/debugger/SCsub b/scene/debugger/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/debugger/SCsub +++ b/scene/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/gui/SCsub b/scene/gui/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/gui/SCsub +++ b/scene/gui/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/main/SCsub b/scene/main/SCsub index fc61250247d2..374dc2119dcd 100644 --- a/scene/main/SCsub +++ b/scene/main/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/2d/SCsub b/scene/resources/2d/SCsub index fdf20e0bde3f..408aa3cf7e60 100644 --- a/scene/resources/2d/SCsub +++ b/scene/resources/2d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/3d/SCsub b/scene/resources/3d/SCsub index fdf20e0bde3f..408aa3cf7e60 100644 --- a/scene/resources/3d/SCsub +++ b/scene/resources/3d/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/resources/SCsub b/scene/resources/SCsub index 2b6aa88d2c0c..46f6251b9131 100644 --- a/scene/resources/SCsub +++ b/scene/resources/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/theme/SCsub b/scene/theme/SCsub index 2372d1820a50..fb0914c0ee1a 100644 --- a/scene/theme/SCsub +++ b/scene/theme/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/scene/theme/icons/SCsub b/scene/theme/icons/SCsub index 1f3b7f6d1781..19aca74e57ce 100644 --- a/scene/theme/icons/SCsub +++ b/scene/theme/icons/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/SCsub b/servers/SCsub index 28180a7bb272..7abe53b9e171 100644 --- a/servers/SCsub +++ b/servers/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/audio/SCsub b/servers/audio/SCsub index 5021e578c366..7d293c628dfb 100644 --- a/servers/audio/SCsub +++ b/servers/audio/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/audio/effects/SCsub b/servers/audio/effects/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/audio/effects/SCsub +++ b/servers/audio/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/camera/SCsub b/servers/camera/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/camera/SCsub +++ b/servers/camera/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/debugger/SCsub b/servers/debugger/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/debugger/SCsub +++ b/servers/debugger/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/display/SCsub b/servers/display/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/display/SCsub +++ b/servers/display/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/extensions/SCsub b/servers/extensions/SCsub index 95c7f5d31960..e7bb57e9f3f6 100644 --- a/servers/extensions/SCsub +++ b/servers/extensions/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/movie_writer/SCsub b/servers/movie_writer/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/movie_writer/SCsub +++ b/servers/movie_writer/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/navigation/SCsub b/servers/navigation/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/navigation/SCsub +++ b/servers/navigation/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/SCsub b/servers/rendering/SCsub index cf26ca029d1c..99717618180f 100644 --- a/servers/rendering/SCsub +++ b/servers/rendering/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/dummy/SCsub b/servers/rendering/dummy/SCsub index aa688af6cda6..3e1f338227e2 100644 --- a/servers/rendering/dummy/SCsub +++ b/servers/rendering/dummy/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/dummy/storage/SCsub b/servers/rendering/dummy/storage/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/dummy/storage/SCsub +++ b/servers/rendering/dummy/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/SCsub b/servers/rendering/renderer_rd/SCsub index a27439e9315c..c6d9e3ef36bf 100644 --- a/servers/rendering/renderer_rd/SCsub +++ b/servers/rendering/renderer_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/effects/SCsub b/servers/rendering/renderer_rd/effects/SCsub index 8e13715447cc..9f330c9f0f60 100644 --- a/servers/rendering/renderer_rd/effects/SCsub +++ b/servers/rendering/renderer_rd/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/environment/SCsub b/servers/rendering/renderer_rd/environment/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/renderer_rd/environment/SCsub +++ b/servers/rendering/renderer_rd/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/forward_clustered/SCsub b/servers/rendering/renderer_rd/forward_clustered/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/renderer_rd/forward_clustered/SCsub +++ b/servers/rendering/renderer_rd/forward_clustered/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/forward_mobile/SCsub b/servers/rendering/renderer_rd/forward_mobile/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/renderer_rd/forward_mobile/SCsub +++ b/servers/rendering/renderer_rd/forward_mobile/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/SCsub b/servers/rendering/renderer_rd/shaders/SCsub index 5405985741b1..e102b839b59d 100644 --- a/servers/rendering/renderer_rd/shaders/SCsub +++ b/servers/rendering/renderer_rd/shaders/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/effects/SCsub b/servers/rendering/renderer_rd/shaders/effects/SCsub index 810f781340cd..e5517e52eba0 100644 --- a/servers/rendering/renderer_rd/shaders/effects/SCsub +++ b/servers/rendering/renderer_rd/shaders/effects/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub b/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub index 5b8bbc343b7e..53f3ee397752 100644 --- a/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub +++ b/servers/rendering/renderer_rd/shaders/effects/fsr2/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/environment/SCsub b/servers/rendering/renderer_rd/shaders/environment/SCsub index f06a2d86e240..2c3e7d39ef23 100644 --- a/servers/rendering/renderer_rd/shaders/environment/SCsub +++ b/servers/rendering/renderer_rd/shaders/environment/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub b/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub index f06a2d86e240..2c3e7d39ef23 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub b/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub index f06a2d86e240..2c3e7d39ef23 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/spirv-reflect/SCsub b/servers/rendering/renderer_rd/spirv-reflect/SCsub index 4c27e5bef772..8d3d8560a599 100644 --- a/servers/rendering/renderer_rd/spirv-reflect/SCsub +++ b/servers/rendering/renderer_rd/spirv-reflect/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/renderer_rd/storage_rd/SCsub b/servers/rendering/renderer_rd/storage_rd/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/renderer_rd/storage_rd/SCsub +++ b/servers/rendering/renderer_rd/storage_rd/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/rendering/storage/SCsub b/servers/rendering/storage/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/rendering/storage/SCsub +++ b/servers/rendering/storage/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/text/SCsub b/servers/text/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/text/SCsub +++ b/servers/text/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/servers/xr/SCsub b/servers/xr/SCsub index 86681f9c74d3..98f918b2458c 100644 --- a/servers/xr/SCsub +++ b/servers/xr/SCsub @@ -1,4 +1,5 @@ #!/usr/bin/env python +from misc.utility.scons_hints import * Import("env") diff --git a/tests/SCsub b/tests/SCsub index d96a1142e4dc..169c7c1efa87 100644 --- a/tests/SCsub +++ b/tests/SCsub @@ -1,4 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python +from misc.utility.scons_hints import * Import("env")