This commit is contained in:
2025-11-05 16:21:05 +08:00
commit 00967a138d
24 changed files with 1930 additions and 0 deletions

23
CoreModules/flags.py Normal file
View File

@@ -0,0 +1,23 @@
from ..Convention.Runtime.Architecture import *
from pydantic import *
class DebugFlags(BaseModel):
debug: bool = Field(default=False)
class VerboseFlags(BaseModel):
verbose: bool = Field(default=False)
Architecture.Register(DebugFlags, DebugFlags(debug=False), lambda: None)
Architecture.Register(VerboseFlags, VerboseFlags(verbose=False), lambda: None)
def set_internal_debug(debug:bool) -> None:
Architecture.Get(DebugFlags).debug = debug
def get_internal_debug() -> bool:
return Architecture.Get(DebugFlags).debug
def set_internal_verbose(verbose:bool) -> None:
Architecture.Get(VerboseFlags).verbose = verbose
def get_internal_verbose() -> bool:
return Architecture.Get(VerboseFlags).verbose
__all__ = ["set_internal_debug", "get_internal_debug", "set_internal_verbose", "get_internal_verbose"]