Commit bd60e8a9 authored by Javier Jardón's avatar Javier Jardón Committed by Tristan Maat

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)
parent 3b5c8a28
Pipeline #41909065 passed with stages
in 32 minutes and 11 seconds
......@@ -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.
......
......@@ -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
......
......@@ -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.
......
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment