Tristan Maat pushed to branch jjardon/pycodestyle at BuildStream / buildstream
Commits:
-
bd60e8a9
by Javier Jardón at 2019-01-02T16:59:41Z
6 changed files:
- buildstream/_ostree.py
- buildstream/_signals.py
- buildstream/element.py
- dev-requirements.txt
- setup.cfg
- tests/testutils/http_server.py
Changes:
| ... | ... | @@ -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
|
| ... | ... | @@ -1568,7 +1568,7 @@ class Element(Plugin): |
| 1568 | 1568 |
utils._force_rmtree(rootdir)
|
| 1569 | 1569 |
|
| 1570 | 1570 |
with _signals.terminator(cleanup_rootdir), \
|
| 1571 |
- self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # nopep8
|
|
| 1571 |
+ self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # noqa
|
|
| 1572 | 1572 |
|
| 1573 | 1573 |
# By default, the dynamic public data is the same as the static public data.
|
| 1574 | 1574 |
# The plugin's assemble() method may modify this, though.
|
| 1 | 1 |
coverage == 4.4.0
|
| 2 |
-pep8
|
|
| 3 | 2 |
pylint
|
| 4 | 3 |
pytest >= 3.9
|
| 4 |
+pytest-codestyle >= 1.4.0
|
|
| 5 | 5 |
pytest-cov >= 2.5.0
|
| 6 | 6 |
pytest-datafiles >= 2.0
|
| 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
|
| ... | ... | @@ -29,7 +29,7 @@ class RequestHandler(SimpleHTTPRequestHandler): |
| 29 | 29 |
expected_password, directory = self.server.users[user]
|
| 30 | 30 |
if password == expected_password:
|
| 31 | 31 |
return directory
|
| 32 |
- except:
|
|
| 32 |
+ except: # noqa
|
|
| 33 | 33 |
raise Unauthorized('unauthorized')
|
| 34 | 34 |
return None
|
| 35 | 35 |
|
