summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-03-25 11:46:04 +0200
committerJürg Billeter <j@bitron.ch>2018-03-25 12:12:02 +0200
commitc9701cdfe6171804218511fbfec6a59b6c595648 (patch)
tree98ce408687960e8cec511fe441d90c58be40515e
parentfa25a6a2a759fa8fbecad75308920b8be883caaa (diff)
downloadbuildstream-c9701cdfe6171804218511fbfec6a59b6c595648.tar.gz
Remove unused imports
-rw-r--r--buildstream/_frontend/main.py8
-rw-r--r--buildstream/_pipeline.py2
-rw-r--r--buildstream/_projectrefs.py1
-rw-r--r--buildstream/_scheduler/trackqueue.py4
-rw-r--r--buildstream/element.py2
-rw-r--r--buildstream/plugin.py2
-rw-r--r--buildstream/plugins/elements/compose.py2
-rw-r--r--buildstream/plugins/elements/junction.py1
-rwxr-xr-xconftest.py1
-rw-r--r--doc/source/invoking.rst2
-rw-r--r--tests/testutils/runcli.py2
11 files changed, 8 insertions, 19 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index fcdc5a5a3..fd2384ec3 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -27,25 +27,21 @@ from blessings import Terminal
import click
from click import UsageError
-from .cli import cli
-
# Import buildstream public symbols
from .. import Scope
# Import various buildstream internals
from .._context import Context
from .._project import Project
-from .._exceptions import BstError, LoadError
+from .._exceptions import BstError
from .._message import MessageType, unconditional_messages
-from .._pipeline import Pipeline, PipelineError
+from .._pipeline import Pipeline
from .._scheduler import Scheduler
from .._profile import Topics, profile_start, profile_end
-from .. import _yaml
from .. import __version__ as build_stream_version
# Import frontend assets
from . import Profile, LogLine, Status
-from .complete import main_bashcomplete, complete_path, CompleteUnhandled
# Intendation for all logging
INDENT = 4
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index d4f65b497..268e7111c 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -29,7 +29,7 @@ from contextlib import contextmanager
from operator import itemgetter
from tempfile import TemporaryDirectory
-from ._exceptions import PipelineError, ArtifactError, ImplError, BstError
+from ._exceptions import PipelineError, ImplError, BstError
from ._message import Message, MessageType
from ._loader import Loader
from . import Consistency
diff --git a/buildstream/_projectrefs.py b/buildstream/_projectrefs.py
index bf58e1e81..af63c26a5 100644
--- a/buildstream/_projectrefs.py
+++ b/buildstream/_projectrefs.py
@@ -18,7 +18,6 @@
# Authors:
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
import os
-from collections import Mapping
from . import _yaml
from ._exceptions import LoadError, LoadErrorReason
diff --git a/buildstream/_scheduler/trackqueue.py b/buildstream/_scheduler/trackqueue.py
index 4ba0f82f5..c3ee7cf7d 100644
--- a/buildstream/_scheduler/trackqueue.py
+++ b/buildstream/_scheduler/trackqueue.py
@@ -19,13 +19,9 @@
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
# Jürg Billeter <juerg.billeter@codethink.co.uk>
-# System imports
-import os
-
# BuildStream toplevel imports
from ..plugin import _plugin_lookup
from .. import SourceError
-from .. import _yaml
# Local imports
from . import Queue, QueueStatus, QueueType
diff --git a/buildstream/element.py b/buildstream/element.py
index e0cefbbe2..8532f995c 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -37,7 +37,7 @@ from . import _yaml
from ._variables import Variables
from ._exceptions import BstError, LoadError, LoadErrorReason, ImplError, ErrorDomain
from . import Plugin, Consistency
-from . import Sandbox, SandboxFlags
+from . import SandboxFlags
from . import utils
from . import _cachekey
from . import _signals
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index ad59da684..28a04600e 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -72,7 +72,7 @@ import subprocess
from contextlib import contextmanager
from weakref import WeakValueDictionary
-from . import _yaml, _signals
+from . import _yaml
from . import utils
from ._exceptions import PluginError, ImplError
from ._message import Message, MessageType
diff --git a/buildstream/plugins/elements/compose.py b/buildstream/plugins/elements/compose.py
index 3daebd8ae..0fa79336c 100644
--- a/buildstream/plugins/elements/compose.py
+++ b/buildstream/plugins/elements/compose.py
@@ -35,7 +35,7 @@ The default configuration and possible options are as such:
import os
from buildstream import utils
-from buildstream import Element, ElementError, Scope
+from buildstream import Element, Scope
# Element implementation for the 'compose' kind.
diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py
index 9a08edcc3..a512222e0 100644
--- a/buildstream/plugins/elements/junction.py
+++ b/buildstream/plugins/elements/junction.py
@@ -108,7 +108,6 @@ the user to resolve possibly conflicting nested junctions by creating a junction
with the same name in the top-level project, which then takes precedence.
"""
-import os
from collections import Mapping
from buildstream import Element
from buildstream._pipeline import PipelineError
diff --git a/conftest.py b/conftest.py
index e4eb1f5a8..99a602db4 100755
--- a/conftest.py
+++ b/conftest.py
@@ -20,7 +20,6 @@
import os
import shutil
-import tempfile
import pytest
diff --git a/doc/source/invoking.rst b/doc/source/invoking.rst
index 1c995a1e7..2f9680230 100644
--- a/doc/source/invoking.rst
+++ b/doc/source/invoking.rst
@@ -5,6 +5,6 @@
Invoking BuildStream
====================
-.. click:: buildstream._frontend.main:cli
+.. click:: buildstream._frontend:cli
:prog: bst
:show-nested:
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py
index e424756e7..ac7c9fa0c 100644
--- a/tests/testutils/runcli.py
+++ b/tests/testutils/runcli.py
@@ -22,7 +22,7 @@ from _pytest.capture import MultiCapture, FDCapture
from tests.testutils.site import IS_LINUX
# Import the main cli entrypoint
-from buildstream._frontend.main import cli as bst_cli
+from buildstream._frontend import cli as bst_cli
from buildstream import _yaml
# Special private exception accessor, for test case purposes