From 6f4b51414561948f7eafea3e87ec51ebc95d0e39 Mon Sep 17 00:00:00 2001 From: Jay Pipes Date: Thu, 2 Mar 2017 11:35:12 -0500 Subject: [PATCH] update pep8/hacking and address failures update to necessary hacking from global requirements and fix up the linting failures. Change-Id: Ie6baa9e1b97ea3e1b61a418b00b64d1be391866a --- .gitreview | 4 ++++ os_traits/__init__.py | 13 +++++-------- test-requirements.txt | 2 +- tox.ini | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 .gitreview diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..bd9e422 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/os-traits.git diff --git a/os_traits/__init__.py b/os_traits/__init__.py index 6b03c26..b15c3bb 100644 --- a/os_traits/__init__.py +++ b/os_traits/__init__.py @@ -21,12 +21,11 @@ __version__ = pbr.version.VersionInfo( 'os_traits').version_string() # Conveniently import all the constants into the main module "namespace" -from os_traits.const import * +from os_traits.const import * # noqa def get_symbol_names(prefix=None): - """ - Returns the names of symbols of trait strings in the os_traits module, + """Returns the names of symbols of trait strings in the os_traits module, optionally filtered by a supplied prefix. :param prefix: Optional string prefix to filter by. e.g. 'hw:' @@ -45,9 +44,8 @@ def get_symbol_names(prefix=None): def get_traits(prefix=None): - """ - Returns the trait strings in the os_traits module, optionally - filtered by a supplied prefix. + """Returns the trait strings in the os_traits module, optionally filtered + by a supplied prefix. :param prefix: Optional string prefix to filter by. e.g. 'hw:' """ @@ -65,8 +63,7 @@ def get_traits(prefix=None): def check_traits(traits): - """ - Returns a tuple of two trait string sets, the first set contains valid + """Returns a tuple of two trait string sets, the first set contains valid traits, and the second contains others. :param traits: An iterable contains trait strings. diff --git a/test-requirements.txt b/test-requirements.txt index 0bf3d9a..5e34866 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking<0.11,>=0.10.0 +hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0 coverage>=3.6 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 8b9ce12..658754a 100644 --- a/tox.ini +++ b/tox.ini @@ -59,6 +59,6 @@ commands = oslo_debug_helper {posargs} # E123, E125 skipped as they are invalid PEP-8. show-source = True -ignore = E123,E125 +ignore = E123,E125,H405 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build