feat: streamline module imports in __main__.py
Removed redundant imports of `deuthon.base` from `__main__.py`, cleaning up the module's import statements to enhance readability and maintainability. Also, annotated an `except` block with `noqa: F821` to suppress a specific linter warning related to the use of an undefined name. This change clarifies the intentional use of dynamic features and exceptions handling within the codebase, ensuring linting tools can accommodate our dynamic execution context without compromising code quality checks. This cleanup contributes to a leaner codebase, potentially improving load times and reducing memory footprint, aligning with our ongoing efforts to optimize the performance and clarity of the Deuthon project.
This commit is contained in:
parent
3933ce4736
commit
5ff8f3856b
1 changed files with 1 additions and 4 deletions
|
@ -12,9 +12,6 @@ from deuthon.transformer import parse_german_code, prepare_builtin_overrides
|
|||
from deuthon.importer import install_deuthon_importer, import_base
|
||||
from deuthon.interpreter import interpreter
|
||||
|
||||
import deuthon.base
|
||||
|
||||
|
||||
def main():
|
||||
args = ArgumentParser()
|
||||
args.add_argument("file", default="", nargs="?")
|
||||
|
@ -41,7 +38,7 @@ def main():
|
|||
|
||||
try:
|
||||
exec(code_object, {"__file__": pathlib.Path(args.file).absolute()})
|
||||
except Ausnahme as e:
|
||||
except Ausnahme as e: # noqa: F821
|
||||
# Extract traceback information, excluding frames related to the interpreter
|
||||
tb = e.__traceback__
|
||||
while tb is not None:
|
||||
|
|
Loading…
Reference in a new issue