Skip to content

Commit f3dbab4

Browse files
Dean TroyerTerryHowe
authored andcommitted
Fix PEP8 E302 errors
Also add remaining skipped checks to HACKING Change-Id: I0c4333ce29597e0a8a233af17c15bed2b4d0711f
1 parent 4d3d287 commit f3dbab4

5 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎HACKING.rst‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ OpenStack Style Commandments
55
http://docs.openstack.org/developer/hacking/
66
- Step 2: Read on
77

8+
Deviations from Global Hacking
9+
------------------------------
10+
11+
The following checks are specifically skipped in OpenStackClient::
12+
13+
* H305 - py2/py3 compatibility problems
14+
* H307 - py2/py3 compatibility problems
15+
* H402 - one line docstring ends in period
16+
* H904 - backslash continuation line
17+
18+
819
General
920
-------
1021
- thou shalt not violate causality in our time cone, or else

‎openstackclient/common/restapi.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
import requests
2121

2222
try:
23-
from urllib.parse import urlencode
23+
from urllib.parse import urlencode # noqa
2424
except ImportError:
25-
from urllib import urlencode
25+
from urllib import urlencode # noqa
2626

2727

2828
USER_AGENT = 'RAPI'

‎openstackclient/object/v1/lib/container.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"""Object v1 API library"""
1818

1919
try:
20-
from urllib.parse import urlparse
20+
from urllib.parse import urlparse # noqa
2121
except ImportError:
22-
from urlparse import urlparse
22+
from urlparse import urlparse # noqa
2323

2424

2525
def list_containers(

‎openstackclient/object/v1/lib/object.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import six
2020

2121
try:
22-
from urllib.parse import urlparse
22+
from urllib.parse import urlparse # noqa
2323
except ImportError:
24-
from urlparse import urlparse
24+
from urlparse import urlparse # noqa
2525

2626

2727
def list_objects(

‎tox.ini‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ commands=
2929
python setup.py build_sphinx
3030

3131
[flake8]
32-
ignore = H302,H305,H307,H402,H904
32+
ignore = H305,H307,H402,H904
3333
show-source = True
3434
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools

0 commit comments

Comments
 (0)