From dc07f8de8f1770870e21f6edff07fba66e9c1cc3 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Sun, 5 Jul 2015 06:37:56 -0700 Subject: [PATCH] Update flake8 related dependencies In order to raise the cap on pbr we need to update the dependent versions of the flake8 related packages for the pep8 job since they have capped pbr. A couple of simple hacking issues are fixed, the rest are ignored. Change-Id: Icddb5bf284da7b6463ebcfc7512726149ffe6085 --- migrate/versioning/repository.py | 2 +- migrate/versioning/util/__init__.py | 2 +- migrate/versioning/version.py | 2 +- test-requirements.txt | 8 ++++---- tox.ini | 8 +++++++- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/migrate/versioning/repository.py b/migrate/versioning/repository.py index b317eda..8c8cd3b 100644 --- a/migrate/versioning/repository.py +++ b/migrate/versioning/repository.py @@ -62,7 +62,7 @@ class Changeset(dict): def run(self, *p, **k): """Run the changeset scripts""" - for version, script in self: + for ver, script in self: script.run(*p, **k) diff --git a/migrate/versioning/util/__init__.py b/migrate/versioning/util/__init__.py index a4ddd73..7ad226b 100644 --- a/migrate/versioning/util/__init__.py +++ b/migrate/versioning/util/__init__.py @@ -164,7 +164,7 @@ def with_engine(f, *a, **kw): engine.dispose() -class Memoize: +class Memoize(object): """Memoize(fn) - an instance which acts like fn but memoizes its arguments Will only work on functions with non-mutable arguments diff --git a/migrate/versioning/version.py b/migrate/versioning/version.py index cec75c0..de7008f 100644 --- a/migrate/versioning/version.py +++ b/migrate/versioning/version.py @@ -252,7 +252,7 @@ class Version(object): self.python = script.PythonScript(path) -class Extensions: +class Extensions(object): """A namespace for file extensions""" py = 'py' sql = 'sql' diff --git a/test-requirements.txt b/test-requirements.txt index 573ce34..cd5cb69 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,8 @@ # Install bounded pep8/pyflakes first, then let flake8 install -pep8==1.4.5 -pyflakes>=0.7.2,<0.7.4 -flake8==2.0 -hacking>=0.8.0,<0.9 +pep8==1.5.7 +pyflakes==0.8.1 +flake8>=2.2.4,<=2.4.1 +hacking>=0.10.0,<0.11 coverage>=3.6 discover diff --git a/tox.ini b/tox.ini index 57dedd3..fb2be51 100644 --- a/tox.ini +++ b/tox.ini @@ -80,6 +80,8 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [flake8] +# E111 indentation is not a multiple of four +# E113 unexpected indentation # E121 continuation line indentation is not a multiple of four # E122 continuation line missing indentation or outdented # E123 closing bracket does not match indentation of opening bracket's line @@ -88,12 +90,15 @@ commands = # E126 continuation line over-indented for hanging indent # E127 continuation line over-indented for visual indent # E128 continuation line under-indented for visual indent +# E129 visually indented line with same indent as next logical line +# E131 continuation line unaligned for hanging indent # E202 whitespace before ')' # E203 whitespace before ',' # E225 missing whitespace around operator # E226 missing whitespace around arithmetic operator # E228 missing whitespace around modulo operator # E231 missing whitespace after ',' +# E265 block comment should start with '# ' # H234 assertEquals is deprecated, use assertEqual # E251 unexpected spaces around keyword / parameter equals # E261 at least two spaces before inline comment @@ -122,9 +127,10 @@ commands = # H402 one line docstring needs punctuation. # H403 multi line docstring end on new line # H404 multi line docstring should start with a summary +# H405 multi line docstring summary not separated with an empty line # H501 Do not use locals() for string formatting # W391 blank line at end of file -ignore = E121,E122,E123,E124,E125,E126,E127,E128,E202,E203,E225,E226,E228,E231,E251,E261,E272,E301,E302,E303,E401,E501,E502,E702,E712,F401,F403,F811,F821,F841,H101,H201,H202,H233,H234,H301,H302,H306,H401,H402,H403,H404,H501,W391 +ignore = E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E202,E203,E225,E226,E228,E231,E251,E261,E265,E272,E301,E302,E303,E401,E501,E502,E702,E712,F401,F403,F811,F821,F841,H101,H201,H202,H233,H234,H301,H302,H306,H401,H402,H403,H404,H405,H501,W391 show-source = true builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build