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.
pull/11478/head
Eli Schwartz 2 years ago
parent 0bb1673ec3
commit 61d525cc16
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      mesonbuild/ast/postprocess.py
  2. 2
      mesonbuild/ast/printer.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:

@ -17,7 +17,7 @@
from __future__ import annotations
from .. import mparser
from . import AstVisitor
from .visitor import AstVisitor
import re
import typing as T

Loading…
Cancel
Save