From 3b5c8a280dce392f06eb56a4aed5c3a7ff931388 Mon Sep 17 00:00:00 2001 From: Tristan Maat Date: Tue, 1 Jan 2019 17:01:49 +0100 Subject: .gitlab-ci.yml: Use new testsuite images with pycodestyle 1.4.0 We need to bump the testsuite image versions to use the new pycodestyle update that allows excluding file paths, so that we can exclude generated python code. --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7804f38b..cbe6666ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: buildstream/testsuite-debian:9-master-123-7ce6581b +image: buildstream/testsuite-debian:9-06bab030-b848172c cache: key: "$CI_JOB_NAME-" @@ -91,23 +91,23 @@ source_dist: - ${COVERAGE_DIR} tests-debian-9: - image: buildstream/testsuite-debian:9-master-123-7ce6581b + image: buildstream/testsuite-debian:9-06bab030-b848172c <<: *tests tests-fedora-27: - image: buildstream/testsuite-fedora:27-master-123-7ce6581b + image: buildstream/testsuite-fedora:27-06bab030-b848172c <<: *tests tests-fedora-28: - image: buildstream/testsuite-fedora:28-master-123-7ce6581b + image: buildstream/testsuite-fedora:28-06bab030-b848172c <<: *tests tests-ubuntu-18.04: - image: buildstream/testsuite-ubuntu:18.04-master-123-7ce6581b + image: buildstream/testsuite-ubuntu:18.04-06bab030-b848172c <<: *tests overnight-fedora-28-aarch64: - image: buildstream/testsuite-fedora:aarch64-28-master-123-7ce6581b + image: buildstream/testsuite-fedora:aarch64-28-06bab030-32a101f6 tags: - aarch64 <<: *tests @@ -120,7 +120,7 @@ overnight-fedora-28-aarch64: tests-unix: # Use fedora here, to a) run a test on fedora and b) ensure that we # can get rid of ostree - this is not possible with debian-8 - image: buildstream/testsuite-fedora:27-master-123-7ce6581b + image: buildstream/testsuite-fedora:27-06bab030-b848172c <<: *tests variables: BST_FORCE_BACKEND: "unix" @@ -140,7 +140,7 @@ tests-unix: tests-fedora-missing-deps: # Ensure that tests behave nicely while missing bwrap and ostree - image: buildstream/testsuite-fedora:28-master-123-7ce6581b + image: buildstream/testsuite-fedora:28-06bab030-b848172c <<: *tests script: -- cgit v1.2.1 From bd60e8a91d7164d459f471d4ebbc952abad7c76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 10 Aug 2018 23:39:31 +0100 Subject: Use pycodestyle instead of pep8 pep8 package was renamed to pycodestyle to reduce confusion. Disabled warnings: W504 - Line break after binary operator (seems people like this) W605 - Invalid escape sequence (some of our regexes use these) --- buildstream/_ostree.py | 2 +- buildstream/_signals.py | 2 +- buildstream/element.py | 2 +- dev-requirements.txt | 3 +-- setup.cfg | 17 ++++------------- tests/testutils/http_server.py | 2 +- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py index 5a4039f2f..ab652d77c 100644 --- a/buildstream/_ostree.py +++ b/buildstream/_ostree.py @@ -34,7 +34,7 @@ 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 import GLib, Gio, OSTree # noqa # For users of this file, they must expect (except) it. diff --git a/buildstream/_signals.py b/buildstream/_signals.py index 56f70fa7a..41b100f93 100644 --- a/buildstream/_signals.py +++ b/buildstream/_signals.py @@ -38,7 +38,7 @@ def terminator_handler(signal_, frame): terminator_ = terminator_stack.pop() try: terminator_() - except: # pylint: disable=bare-except + except: # noqa pylint: disable=bare-except # Ensure we print something if there's an exception raised when # processing the handlers. Note that the default exception # handler won't be called because we os._exit next, so we must diff --git a/buildstream/element.py b/buildstream/element.py index f0620a57e..e6c898635 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1568,7 +1568,7 @@ class Element(Plugin): utils._force_rmtree(rootdir) with _signals.terminator(cleanup_rootdir), \ - self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # nopep8 + self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # noqa # By default, the dynamic public data is the same as the static public data. # The plugin's assemble() method may modify this, though. diff --git a/dev-requirements.txt b/dev-requirements.txt index d967829f7..42c300f39 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,11 +1,10 @@ coverage == 4.4.0 -pep8 pylint pytest >= 3.9 +pytest-codestyle >= 1.4.0 pytest-cov >= 2.5.0 pytest-datafiles >= 2.0 pytest-env -pytest-pep8 pytest-pylint pytest-xdist pytest-timeout diff --git a/setup.cfg b/setup.cfg index 7d40c3d25..38f3193ca 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,20 +11,11 @@ parentdir_prefix = BuildStream- test=pytest [tool:pytest] -addopts = --verbose --basetemp ./tmp --pep8 --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20 +addopts = --verbose --basetemp ./tmp --codestyle --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20 norecursedirs = tests/integration/project integration-cache tmp __pycache__ .eggs python_files = tests/*/*.py -pep8maxlinelength = 119 -pep8ignore = - * E129 - * E125 - doc/source/conf.py ALL - tmp/* ALL - */lib/python3* ALL - */bin/* ALL - buildstream/_fuse/fuse.py ALL - .eggs/* ALL - *_pb2.py ALL - *_pb2_grpc.py ALL +codestyle_max_line_length = 119 +codestyle_ignore = E129 E125 W504 W605 +codestyle_exclude = doc/source/conf.py buildstream/_fuse/fuse.py buildstream/_protos/**/*py env = D:BST_TEST_SUITE=True diff --git a/tests/testutils/http_server.py b/tests/testutils/http_server.py index 129003836..f18290c88 100644 --- a/tests/testutils/http_server.py +++ b/tests/testutils/http_server.py @@ -29,7 +29,7 @@ class RequestHandler(SimpleHTTPRequestHandler): expected_password, directory = self.server.users[user] if password == expected_password: return directory - except: + except: # noqa raise Unauthorized('unauthorized') return None -- cgit v1.2.1