Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flake8 and dependencies #13953

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/ci/tcdownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def run(*args, **kwargs):
logger.info(path)


def __main__():
def main():
kwargs = get_parser().parse_args()

run(None, vars(kwargs))


if __name__ == "__main__":
main()
6 changes: 5 additions & 1 deletion tools/py27-flake8.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ select = E,W,F,N
# E305: expected 2 blank lines after end of function or class
# E402: module level import not at top of file
# E731: do not assign a lambda expression, use a def
# W504: line break after binary operator
# W601: .has_key() is deprecated, use ‘in’
# W605: invalid escape sequence
# W606: 'async' and 'await' are reserved keywords starting with Python 3.7
# N801: class names should use CapWords convention
# N802: function name should be lowercase
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,W601,N801,N802
# N806: variable in function should be lowercase
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,W504,W601,W605,W606,N801,N802,N806
exclude =
.tox,
pywebsocket,
Expand Down
4 changes: 3 additions & 1 deletion tools/py36-flake8.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ select = E,W,F,N
# E305: expected 2 blank lines after end of function or class
# E402: module level import not at top of file
# E731: do not assign a lambda expression, use a def
# W504: line break after binary operator
# W605: invalid escape sequence
# N801: class names should use CapWords convention
# N802: function name should be lowercase
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,N801,N802
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,W504,W605,N801,N802
exclude =
.tox,
pywebsocket,
Expand Down
6 changes: 3 additions & 3 deletions tools/requirements_flake8.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flake8==3.5.0
pycodestyle==2.3.1
flake8==3.6.0
pycodestyle==2.4.0
pyflakes==1.6.0
pep8-naming==0.4.1
pep8-naming==0.7.0
4 changes: 1 addition & 3 deletions tools/wptserve/wptserve/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from six.moves.urllib.parse import parse_qs, quote, unquote, urljoin
from six import iteritems

from h2.events import RequestReceived, DataReceived

from .constants import content_types
from .pipes import Pipeline, template
from .ranges import RangeParser
Expand Down Expand Up @@ -79,7 +77,7 @@ def __call__(self, request, response):
%(items)s
</ul>
""" % {"path": cgi.escape(url_path),
"items": "\n".join(self.list_items(url_path, path))} # flake8: noqa
"items": "\n".join(self.list_items(url_path, path))} # noqa: E122

def list_items(self, base_path, path):
assert base_path.endswith("/")
Expand Down