diff --git a/pbr/find_package.py b/pbr/find_package.py index 2319c060..7a82698e 100644 --- a/pbr/find_package.py +++ b/pbr/find_package.py @@ -16,6 +16,7 @@ # under the License. import os + import setuptools diff --git a/pbr/packaging.py b/pbr/packaging.py index 471ed856..036483e4 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -22,16 +22,20 @@ Utilities with minimum-depends for use in setup.py from __future__ import unicode_literals +from distutils.command import install as du_install +import distutils.errors +from distutils import log import email import io import os import re import subprocess import sys +try: + import cStringIO +except ImportError: + import io as cStringIO -from distutils.command import install as du_install -import distutils.errors -from distutils import log import pkg_resources from setuptools.command import easy_install from setuptools.command import egg_info @@ -39,11 +43,6 @@ from setuptools.command import install from setuptools.command import install_scripts from setuptools.command import sdist -try: - import cStringIO -except ImportError: - import io as cStringIO - from pbr import extra_files TRUE_VALUES = ('true', '1', 'yes') @@ -737,7 +736,7 @@ try: 'autodoc_index_modules', 'AUTODOC_INDEX_MODULES') if not os.getenv('SPHINX_DEBUG'): - #NOTE(afazekas): These options can be used together, + # NOTE(afazekas): These options can be used together, # but they do a very similar thing in a difffernet way if tree_index: self._sphinx_tree() diff --git a/pbr/testr_command.py b/pbr/testr_command.py index 34b02ed5..3440f02c 100644 --- a/pbr/testr_command.py +++ b/pbr/testr_command.py @@ -96,7 +96,7 @@ class Testr(cmd.Command): logger.debug("finalize_options: self.__dict__ = %r", self.__dict__) def run(self): - """Set up testr repo, then run testr""" + """Set up testr repo, then run testr.""" logger.debug("run called") if not os.path.isdir(".testrepository"): self._run_testr("init") diff --git a/test-requirements.txt b/test-requirements.txt index 625a7e87..75ad9288 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ coverage>=3.6 discover fixtures>=0.3.14 -hacking>=0.8,<0.9 +hacking>=0.9.2,<0.10 mock>=1.0 python-subunit>=0.0.18 sphinx>=1.1.2,<1.2 diff --git a/tox.ini b/tox.ini index 51d55e27..272272e9 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,9 @@ commands = commands = {posargs} [flake8] -ignore = H803 +# H405 multi line docstring summary not separated with an empty line +# H904 "Wrap lines in parentheses and not a backslash for line continuation +# Removed in current hacking (https://review.openstack.org/#/c/101701/). +ignore = H405,H803,H904 exclude = .venv,.tox,dist,doc,*.egg,build show-source = true