summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-06-27 09:10:28 -0500
committerTerry Howe <terrylhowe@gmail.com>2014-07-22 17:51:15 -0600
commitf3dbab4a6c90541257c10b4b9389455b3e6cec13 (patch)
treedc55c076fa66332dedc1917de587cda3aa52ccc1
parent4d3d287dd7e3032c8da2482f28f27dd766c66a23 (diff)
downloadpython-openstackclient-f3dbab4a6c90541257c10b4b9389455b3e6cec13.tar.gz
Fix PEP8 E302 errors
Also add remaining skipped checks to HACKING Change-Id: I0c4333ce29597e0a8a233af17c15bed2b4d0711f
-rw-r--r--HACKING.rst11
-rw-r--r--openstackclient/common/restapi.py4
-rw-r--r--openstackclient/object/v1/lib/container.py4
-rw-r--r--openstackclient/object/v1/lib/object.py4
-rw-r--r--tox.ini2
5 files changed, 18 insertions, 7 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 8744a93a..27c5e485 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -5,6 +5,17 @@ OpenStack Style Commandments
http://docs.openstack.org/developer/hacking/
- Step 2: Read on
+Deviations from Global Hacking
+------------------------------
+
+The following checks are specifically skipped in OpenStackClient::
+
+* H305 - py2/py3 compatibility problems
+* H307 - py2/py3 compatibility problems
+* H402 - one line docstring ends in period
+* H904 - backslash continuation line
+
+
General
-------
- thou shalt not violate causality in our time cone, or else
diff --git a/openstackclient/common/restapi.py b/openstackclient/common/restapi.py
index f20ad23d..a4822a10 100644
--- a/openstackclient/common/restapi.py
+++ b/openstackclient/common/restapi.py
@@ -20,9 +20,9 @@ import logging
import requests
try:
- from urllib.parse import urlencode
+ from urllib.parse import urlencode # noqa
except ImportError:
- from urllib import urlencode
+ from urllib import urlencode # noqa
USER_AGENT = 'RAPI'
diff --git a/openstackclient/object/v1/lib/container.py b/openstackclient/object/v1/lib/container.py
index 0bae2349..72e97d4e 100644
--- a/openstackclient/object/v1/lib/container.py
+++ b/openstackclient/object/v1/lib/container.py
@@ -17,9 +17,9 @@
"""Object v1 API library"""
try:
- from urllib.parse import urlparse
+ from urllib.parse import urlparse # noqa
except ImportError:
- from urlparse import urlparse
+ from urlparse import urlparse # noqa
def list_containers(
diff --git a/openstackclient/object/v1/lib/object.py b/openstackclient/object/v1/lib/object.py
index 646737bd..ffc7e9b8 100644
--- a/openstackclient/object/v1/lib/object.py
+++ b/openstackclient/object/v1/lib/object.py
@@ -19,9 +19,9 @@
import six
try:
- from urllib.parse import urlparse
+ from urllib.parse import urlparse # noqa
except ImportError:
- from urlparse import urlparse
+ from urlparse import urlparse # noqa
def list_objects(
diff --git a/tox.ini b/tox.ini
index bdb98bec..b6935c2f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -29,6 +29,6 @@ commands=
python setup.py build_sphinx
[flake8]
-ignore = H302,H305,H307,H402,H904
+ignore = H305,H307,H402,H904
show-source = True
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools