summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2018-02-14 17:26:27 +0000
committerJames Ennis <james.ennis@codethink.com>2018-03-14 17:31:06 +0000
commit9b4f54e1f8f1d064faaa51a5f480cb890892fb54 (patch)
treedfda24e235f26161cdb2a157117e06ec7ecd1ef6
parentb11b48eadd3052d7e209ae7be8c513ca128099e3 (diff)
downloadbuildstream-9b4f54e1f8f1d064faaa51a5f480cb890892fb54.tar.gz
pylint - dealt with import warnings
-rw-r--r--.pylintrc4
-rw-r--r--buildstream/_artifactcache/pushreceive.py9
-rw-r--r--buildstream/_frontend/main.py6
-rw-r--r--buildstream/_frontend/profile.py2
-rw-r--r--buildstream/_fuse/mount.py5
-rw-r--r--buildstream/_options/optionpool.py3
-rw-r--r--buildstream/_ostree.py7
-rw-r--r--buildstream/_pipeline.py2
-rw-r--r--buildstream/sandbox/_sandboxchroot.py2
-rwxr-xr-xconftest.py3
10 files changed, 24 insertions, 19 deletions
diff --git a/.pylintrc b/.pylintrc
index a2d82164f..17e3cce35 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -114,10 +114,6 @@ disable=#####################################
logging-format-interpolation,
- # We aren't fully compliant with pep8 import order yet
- wrong-import-order,
- wrong-import-position,
- ungrouped-imports,
unnecessary-pass,
cyclic-import,
diff --git a/buildstream/_artifactcache/pushreceive.py b/buildstream/_artifactcache/pushreceive.py
index 33f19859c..db893eb08 100644
--- a/buildstream/_artifactcache/pushreceive.py
+++ b/buildstream/_artifactcache/pushreceive.py
@@ -18,23 +18,24 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import click
import logging
+import multiprocessing
import os
import subprocess
import sys
import shutil
import tarfile
import tempfile
-import multiprocessing
from enum import Enum
from urllib.parse import urlparse
+import click
+import gi
+
from .. import _signals
-import gi
gi.require_version('OSTree', '1.0')
+# pylint: disable=wrong-import-position,wrong-import-order
from gi.repository import GLib, Gio, OSTree # nopep8
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index 1b6c46239..fcdc5a5a3 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -17,16 +17,18 @@
#
# Authors:
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
-from .cli import cli
import os
import sys
-import click
import resource
from contextlib import contextmanager
from blessings import Terminal
+
+import click
from click import UsageError
+from .cli import cli
+
# Import buildstream public symbols
from .. import Scope
diff --git a/buildstream/_frontend/profile.py b/buildstream/_frontend/profile.py
index b17c4cf90..66cf3b047 100644
--- a/buildstream/_frontend/profile.py
+++ b/buildstream/_frontend/profile.py
@@ -18,8 +18,8 @@
# Authors:
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
import re
-import click
import copy
+import click
# Profile()
diff --git a/buildstream/_fuse/mount.py b/buildstream/_fuse/mount.py
index e7662d2b5..8220a8d07 100644
--- a/buildstream/_fuse/mount.py
+++ b/buildstream/_fuse/mount.py
@@ -23,10 +23,11 @@ import signal
import time
import sys
-from .._exceptions import ImplError
-from .fuse import FUSE
from contextlib import contextmanager
from multiprocessing import Process
+from .fuse import FUSE
+
+from .._exceptions import ImplError
from .. import _signals
diff --git a/buildstream/_options/optionpool.py b/buildstream/_options/optionpool.py
index 9d7228f27..0d9adf366 100644
--- a/buildstream/_options/optionpool.py
+++ b/buildstream/_options/optionpool.py
@@ -18,8 +18,9 @@
# Authors:
# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>
#
-import jinja2
+
from collections import Mapping
+import jinja2
from .. import _yaml
from .._exceptions import LoadError, LoadErrorReason
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py
index 7d0d687a3..a1f01aa96 100644
--- a/buildstream/_ostree.py
+++ b/buildstream/_ostree.py
@@ -27,12 +27,15 @@
# pylint: disable=bad-exception-context,catching-non-exception
import os
-from ._exceptions import BstError, ErrorDomain
import gi
+from gi.repository.GLib import Variant, VariantDict
+
+from ._exceptions import BstError, ErrorDomain
+
+# pylint: disable=wrong-import-position,wrong-import-order
gi.require_version('OSTree', '1.0')
from gi.repository import GLib, Gio, OSTree # nopep8
-from gi.repository.GLib import Variant, VariantDict # nopep8
# For users of this file, they must expect (except) it.
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 489fdc769..42dab3b01 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -37,7 +37,7 @@ from . import Scope
from . import _site
from . import utils
from ._platform import Platform
-from ._artifactcache import ArtifactCacheSpec, configured_remote_artifact_cache_specs
+from ._artifactcache.artifactcache import ArtifactCacheSpec, configured_remote_artifact_cache_specs
from ._scheduler import SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue
diff --git a/buildstream/sandbox/_sandboxchroot.py b/buildstream/sandbox/_sandboxchroot.py
index 584f0e116..4803e2181 100644
--- a/buildstream/sandbox/_sandboxchroot.py
+++ b/buildstream/sandbox/_sandboxchroot.py
@@ -22,10 +22,10 @@
import os
import sys
import stat
-import psutil
import signal
import subprocess
from contextlib import contextmanager, ExitStack
+import psutil
from .._exceptions import SandboxError
from .. import utils
diff --git a/conftest.py b/conftest.py
index ffe8fb3ae..e4eb1f5a8 100755
--- a/conftest.py
+++ b/conftest.py
@@ -19,10 +19,11 @@
# Tristan Maat <tristan.maat@codethink.co.uk>
import os
-import pytest
import shutil
import tempfile
+import pytest
+
def pytest_addoption(parser):
parser.addoption('--integration', action='store_true', default=False,