diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-20 22:54:17 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-29 11:28:32 +0000 |
commit | f08625b6a7b247665453b6a7d4872d6cb870bb30 (patch) | |
tree | 90f3922dd7148f1ea32b571c10db62e94bcb0b67 /buildstream/_loader/loader.py | |
parent | 83c56d548b9a7827399888189a828be3c7c7dfd2 (diff) | |
download | buildstream-bschubert/lint/cyclic-import.tar.gz |
lint: Fix or silence 'cyclic-import' errors and enable pylint for itbschubert/lint/cyclic-import
Cyclic imports can be confusing because the order in which we import
dependencies can make the import fail or not. We should not rely on
ordering of imports for our code. This fixes everywhere possible the
imports and silence explicitely some which are not convenient or would
require big refactors
Diffstat (limited to 'buildstream/_loader/loader.py')
-rw-r--r-- | buildstream/_loader/loader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py index 4c2bfec77..86ecf878e 100644 --- a/buildstream/_loader/loader.py +++ b/buildstream/_loader/loader.py @@ -30,8 +30,8 @@ from .._includes import Includes from .types import Symbol from .loadelement import LoadElement, _extract_depends_from_node -from . import MetaElement -from . import MetaSource +from .metaelement import MetaElement +from .metasource import MetaSource from ..types import CoreWarnings from .._message import Message, MessageType @@ -565,7 +565,7 @@ class Loader(): # Load the project project_dir = os.path.join(basedir, element.path) try: - from .._project import Project + from .._project import Project # pylint: disable=cyclic-import project = Project(project_dir, self._context, junction=element, parent_loader=self, search_for_project=False) except LoadError as e: |