diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-28 15:28:21 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-28 15:46:53 -0500 |
commit | 61d525cc16a10dcd780d2fc14a7371dc809223d0 (patch) | |
tree | a5d46354e5d82a775c13dd04724f4024a52ff243 | |
parent | 0bb1673ec36b4fe498aa4636ac52ea24fd36b2e9 (diff) | |
download | meson-61d525cc16a10dcd780d2fc14a7371dc809223d0.tar.gz |
refactor a few subsystem-relative imports that imported the wrong location
Inside of mesonbuild.ast.* we can and should import from .foobar, rather
than importing from .__init__'s re-exported version of that object.
Failing to do so results in an extremely brittle codebase where simply
changing the order of lines in __init__.py can result in ImportError.
-rw-r--r-- | mesonbuild/ast/postprocess.py | 2 | ||||
-rw-r--r-- | mesonbuild/ast/printer.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/ast/postprocess.py b/mesonbuild/ast/postprocess.py index 0c28af09f..09c339dd6 100644 --- a/mesonbuild/ast/postprocess.py +++ b/mesonbuild/ast/postprocess.py @@ -16,7 +16,7 @@ # or an interpreter-based tool from __future__ import annotations -from . import AstVisitor +from .visitor import AstVisitor import typing as T if T.TYPE_CHECKING: diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py index 3c5391018..579a83d00 100644 --- a/mesonbuild/ast/printer.py +++ b/mesonbuild/ast/printer.py @@ -17,7 +17,7 @@ from __future__ import annotations from .. import mparser -from . import AstVisitor +from .visitor import AstVisitor import re import typing as T |