Fixing PEP8 E712 and E265
1. PEP8 E712, removed singleton comparison using '==' operator: E712 comparison to True should be 'if cond is True:'or 'if cond:' Two places. 2. Fix PEP8 E265 block comment syntax. E265 block comment should start with '# ' 3. No more E712 so removed it from tox.ini ignored list. Change-Id: I778aa5c4e1458cccb7a34d087b3b59eceadd45d0
This commit is contained in:
parent
bd04fbeed5
commit
36e293b5d5
@ -214,7 +214,7 @@ class StoreLocation(location.StoreLocation):
|
|||||||
|
|
||||||
return '%s://%s/%s/%s' % ('swift+config', store, container, obj)
|
return '%s://%s/%s/%s' % ('swift+config', store, container, obj)
|
||||||
if self.scheme == 'swift+config':
|
if self.scheme == 'swift+config':
|
||||||
if self.ssl_enabled == True:
|
if self.ssl_enabled:
|
||||||
self.scheme = 'swift+https'
|
self.scheme = 'swift+https'
|
||||||
else:
|
else:
|
||||||
self.scheme = 'swift+http'
|
self.scheme = 'swift+http'
|
||||||
@ -346,7 +346,7 @@ class StoreLocation(location.StoreLocation):
|
|||||||
return self.auth_or_store_url
|
return self.auth_or_store_url
|
||||||
else:
|
else:
|
||||||
if self.scheme == 'swift+config':
|
if self.scheme == 'swift+config':
|
||||||
if self.ssl_enabled == True:
|
if self.ssl_enabled:
|
||||||
self.scheme = 'swift+https'
|
self.scheme = 'swift+https'
|
||||||
else:
|
else:
|
||||||
self.scheme = 'swift+http'
|
self.scheme = 'swift+http'
|
||||||
|
@ -18,7 +18,9 @@ oslotest
|
|||||||
sphinx>=1.1.2,!=1.2.0,<1.3
|
sphinx>=1.1.2,!=1.2.0,<1.3
|
||||||
oslosphinx
|
oslosphinx
|
||||||
|
|
||||||
### Store specific packages
|
#
|
||||||
|
# Store specific packages
|
||||||
|
#
|
||||||
|
|
||||||
# For S3 storage backend
|
# For S3 storage backend
|
||||||
boto>=2.12.0,!=2.13.0
|
boto>=2.12.0,!=2.13.0
|
||||||
|
3
tox.ini
3
tox.ini
@ -28,9 +28,8 @@ commands = {posargs}
|
|||||||
[flake8]
|
[flake8]
|
||||||
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
||||||
# E711 comparison to None should be 'if cond is not None:'
|
# E711 comparison to None should be 'if cond is not None:'
|
||||||
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
|
|
||||||
# H301 one import per line
|
# H301 one import per line
|
||||||
# H404 multi line docstring should start with a summary
|
# H404 multi line docstring should start with a summary
|
||||||
ignore = E711,E712,H301,H404
|
ignore = E711,H301,H404
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.git,.tox,dist,doc,etc,*glance_store/locale*,*openstack/common*,*lib/python*,*egg,build
|
exclude = .venv,.git,.tox,dist,doc,etc,*glance_store/locale*,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
Loading…
Reference in New Issue
Block a user