diff --git a/designateclient/auth.py b/designateclient/auth.py index b3892e4..72d8ee3 100644 --- a/designateclient/auth.py +++ b/designateclient/auth.py @@ -14,10 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. -from requests.auth import AuthBase from urlparse import urlparse from keystoneclient.v2_0.client import Client +from requests.auth import AuthBase class KeystoneAuth(AuthBase): diff --git a/designateclient/cli/base.py b/designateclient/cli/base.py index 63afe33..189131f 100644 --- a/designateclient/cli/base.py +++ b/designateclient/cli/base.py @@ -14,13 +14,15 @@ # License for the specific language governing permissions and limitations # under the License. import abc + from cliff.command import Command as CliffCommand from cliff.lister import Lister from cliff.show import ShowOne +import six + from designateclient import exceptions from designateclient import utils from designateclient.v1 import Client -import six @six.add_metaclass(abc.ABCMeta) diff --git a/designateclient/shell.py b/designateclient/shell.py index d7784a5..5802d24 100644 --- a/designateclient/shell.py +++ b/designateclient/shell.py @@ -19,6 +19,7 @@ import os from cliff.app import App from cliff.commandmanager import CommandManager + from designateclient.version import version_info as version diff --git a/designateclient/utils.py b/designateclient/utils.py index 8d559e0..60ccca2 100644 --- a/designateclient/utils.py +++ b/designateclient/utils.py @@ -14,10 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. -import os -import pkg_resources - import json +import os + +import pkg_resources from designateclient import exceptions diff --git a/designateclient/v1/base.py b/designateclient/v1/base.py index bb1f88d..a010699 100644 --- a/designateclient/v1/base.py +++ b/designateclient/v1/base.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. import abc + import six diff --git a/test-requirements.txt b/test-requirements.txt index bcd9d75..e4e7021 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ # Hacking already pins down pep8, pyflakes and flake8 -hacking>=0.8.0,<0.9 +hacking>=0.9.2,<0.10 coverage>=3.6 discover python-subunit>=0.0.18 diff --git a/tox.ini b/tox.ini index b2b93f0..594377a 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,16 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' commands = {posargs} [flake8] -ignore = H302,H401,H402,H404 +# ignored flake8 codes: +# H104 file contains nothing more than comments +# H302 import only modules +# H401 docstring should not start with a space +# H402 one line docstring needs punctuation +# H404 multi line docstring should start with a summary +# H405 multi line docstring summary not separated with an empty line +# H904 Wrap long lines in parentheses instead of a backslash +# See designate for other ignored codes that may apply here + +ignore = H104,H302,H401,H402,H404,H405,H904 builtins = _ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools