Tristan Maat pushed to branch jjardon/pycodestyle at BuildStream / buildstream
Commits:
-
63d3c93a
by Javier Jardón at 2019-01-02T13:12:58Z
-
2adbfd80
by Javier Jardón at 2019-01-02T13:13:04Z
-
cf5970a7
by Javier Jardón at 2019-01-02T13:13:04Z
-
24d013b8
by Javier Jardón at 2019-01-02T13:13:15Z
-
1913da86
by Tristan Maat at 2019-01-02T13:13:28Z
6 changed files:
- .gitlab-ci.yml
- buildstream/_ostree.py
- buildstream/_signals.py
- buildstream/element.py
- dev-requirements.txt
- setup.cfg
Changes:
1 |
-image: buildstream/testsuite-debian:9-master-119-552f5fc6
|
|
1 |
+image: buildstream/testsuite-debian:9-06bab030-b848172c
|
|
2 | 2 |
|
3 | 3 |
cache:
|
4 | 4 |
key: "$CI_JOB_NAME-"
|
... | ... | @@ -75,6 +75,7 @@ source_dist: |
75 | 75 |
script:
|
76 | 76 |
- useradd -Um buildstream
|
77 | 77 |
- chown -R buildstream:buildstream .
|
78 |
+ - pip3 install pytest-codestyle
|
|
78 | 79 |
|
79 | 80 |
# Run the tests from the source distribution, We run as a simple
|
80 | 81 |
# user to test for permission issues
|
... | ... | @@ -91,23 +92,23 @@ source_dist: |
91 | 92 |
- ${COVERAGE_DIR}
|
92 | 93 |
|
93 | 94 |
tests-debian-9:
|
94 |
- image: buildstream/testsuite-debian:9-master-123-7ce6581b
|
|
95 |
+ image: buildstream/testsuite-debian:9-06bab030-b848172c
|
|
95 | 96 |
<<: *tests
|
96 | 97 |
|
97 | 98 |
tests-fedora-27:
|
98 |
- image: buildstream/testsuite-fedora:27-master-123-7ce6581b
|
|
99 |
+ image: buildstream/testsuite-fedora:27-06bab030-b848172c
|
|
99 | 100 |
<<: *tests
|
100 | 101 |
|
101 | 102 |
tests-fedora-28:
|
102 |
- image: buildstream/testsuite-fedora:28-master-123-7ce6581b
|
|
103 |
+ image: buildstream/testsuite-fedora:28-06bab030-b848172c
|
|
103 | 104 |
<<: *tests
|
104 | 105 |
|
105 | 106 |
tests-ubuntu-18.04:
|
106 |
- image: buildstream/testsuite-ubuntu:18.04-master-123-7ce6581b
|
|
107 |
+ image: buildstream/testsuite-ubuntu:18.04-06bab030-b848172c
|
|
107 | 108 |
<<: *tests
|
108 | 109 |
|
109 | 110 |
overnight-fedora-28-aarch64:
|
110 |
- image: buildstream/testsuite-fedora:aarch64-28-master-123-7ce6581b
|
|
111 |
+ image: buildstream/testsuite-fedora:aarch64-28-06bab030-32a101f6
|
|
111 | 112 |
tags:
|
112 | 113 |
- aarch64
|
113 | 114 |
<<: *tests
|
... | ... | @@ -120,7 +121,7 @@ overnight-fedora-28-aarch64: |
120 | 121 |
tests-unix:
|
121 | 122 |
# Use fedora here, to a) run a test on fedora and b) ensure that we
|
122 | 123 |
# can get rid of ostree - this is not possible with debian-8
|
123 |
- image: buildstream/testsuite-fedora:27-master-123-7ce6581b
|
|
124 |
+ image: buildstream/testsuite-fedora:27-06bab030-b848172c
|
|
124 | 125 |
<<: *tests
|
125 | 126 |
variables:
|
126 | 127 |
BST_FORCE_BACKEND: "unix"
|
... | ... | @@ -140,7 +141,7 @@ tests-unix: |
140 | 141 |
|
141 | 142 |
tests-fedora-missing-deps:
|
142 | 143 |
# Ensure that tests behave nicely while missing bwrap and ostree
|
143 |
- image: buildstream/testsuite-fedora:28-master-119-552f5fc6
|
|
144 |
+ image: buildstream/testsuite-fedora:28-06bab030-b848172c
|
|
144 | 145 |
<<: *tests
|
145 | 146 |
|
146 | 147 |
script:
|
... | ... | @@ -34,7 +34,7 @@ from ._exceptions import BstError, ErrorDomain |
34 | 34 |
|
35 | 35 |
# pylint: disable=wrong-import-position,wrong-import-order
|
36 | 36 |
gi.require_version('OSTree', '1.0')
|
37 |
-from gi.repository import GLib, Gio, OSTree # nopep8
|
|
37 |
+from gi.repository import GLib, Gio, OSTree # noqa
|
|
38 | 38 |
|
39 | 39 |
|
40 | 40 |
# For users of this file, they must expect (except) it.
|
... | ... | @@ -38,7 +38,7 @@ def terminator_handler(signal_, frame): |
38 | 38 |
terminator_ = terminator_stack.pop()
|
39 | 39 |
try:
|
40 | 40 |
terminator_()
|
41 |
- except: # pylint: disable=bare-except
|
|
41 |
+ except: # noqa pylint: disable=bare-except
|
|
42 | 42 |
# Ensure we print something if there's an exception raised when
|
43 | 43 |
# processing the handlers. Note that the default exception
|
44 | 44 |
# handler won't be called because we os._exit next, so we must
|
... | ... | @@ -1547,7 +1547,7 @@ class Element(Plugin): |
1547 | 1547 |
utils._force_rmtree(rootdir)
|
1548 | 1548 |
|
1549 | 1549 |
with _signals.terminator(cleanup_rootdir), \
|
1550 |
- self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # nopep8
|
|
1550 |
+ self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # noqa
|
|
1551 | 1551 |
|
1552 | 1552 |
# By default, the dynamic public data is the same as the static public data.
|
1553 | 1553 |
# The plugin's assemble() method may modify this, though.
|
1 | 1 |
coverage == 4.4.0
|
2 |
-pep8
|
|
3 | 2 |
pylint == 2.1.1
|
4 | 3 |
pytest >= 3.8
|
4 |
+pytest-codestyle >= 1.4.0
|
|
5 | 5 |
pytest-cov >= 2.5.0
|
6 | 6 |
pytest-datafiles
|
7 | 7 |
pytest-env
|
8 |
-pytest-pep8
|
|
9 | 8 |
pytest-pylint
|
10 | 9 |
pytest-xdist
|
11 | 10 |
pytest-timeout
|
... | ... | @@ -11,20 +11,11 @@ parentdir_prefix = BuildStream- |
11 | 11 |
test=pytest
|
12 | 12 |
|
13 | 13 |
[tool:pytest]
|
14 |
-addopts = --verbose --basetemp ./tmp --pep8 --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20
|
|
14 |
+addopts = --verbose --basetemp ./tmp --codestyle --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20
|
|
15 | 15 |
norecursedirs = tests/integration/project integration-cache tmp __pycache__ .eggs
|
16 | 16 |
python_files = tests/*/*.py
|
17 |
-pep8maxlinelength = 119
|
|
18 |
-pep8ignore =
|
|
19 |
- * E129
|
|
20 |
- * E125
|
|
21 |
- doc/source/conf.py ALL
|
|
22 |
- tmp/* ALL
|
|
23 |
- */lib/python3* ALL
|
|
24 |
- */bin/* ALL
|
|
25 |
- buildstream/_fuse/fuse.py ALL
|
|
26 |
- .eggs/* ALL
|
|
27 |
- *_pb2.py ALL
|
|
28 |
- *_pb2_grpc.py ALL
|
|
17 |
+codestyle_max_line_length = 119
|
|
18 |
+codestyle_ignore = E129 E125 W504 W605
|
|
19 |
+codestyle_exclude = doc/source/conf.py buildstream/_fuse/fuse.py buildstream/_protos/**/*py
|
|
29 | 20 |
env =
|
30 | 21 |
D:BST_TEST_SUITE=True
|