Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module docs with ruff formatting #9410

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ this module:

# SCsub

from typing import TYPE_CHECKING

from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

env_tts = env.Clone()
Expand Down Expand Up @@ -189,6 +197,14 @@ Example `SCsub` with custom flags:

# SCsub

from typing import TYPE_CHECKING

from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

env_tts = env.Clone()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ this module:

# SCsub

from typing import TYPE_CHECKING

from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

env.add_source_files(env.modules_sources, "*.cpp") # Add all cpp files to the build
Expand Down Expand Up @@ -187,6 +195,14 @@ Example ``SCsub`` with custom flags:

# SCsub

from typing import TYPE_CHECKING

from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

module_env = env.Clone()
Expand Down Expand Up @@ -416,6 +432,14 @@ library that will be dynamically loaded when starting our game's binary.

# SCsub

from typing import TYPE_CHECKING

from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

sources = [
Expand Down Expand Up @@ -467,12 +491,21 @@ during runtime with the ``LD_LIBRARY_PATH`` environment variable:
On top of that, it would be nice to be able to select whether to compile our
module as shared library (for development) or as a part of the Godot binary
(for release). To do that we can define a custom flag to be passed to SCons
using the ``ARGUMENT`` command:
using the ``ARGUMENTS`` command:

.. code-block:: python

# SCsub

from typing import TYPE_CHECKING

from SCons.Script import ARGUMENTS
from SCons.Script.SConscript import SConsEnvironment

if TYPE_CHECKING:
env = SConsEnvironment()
Import = SConsEnvironment.Import

Import('env')

sources = [
Expand Down