Fix W605 Errors
Change-Id: I122a9e4383c27535cf546e5762ff4d2a8f6bd569 Story: #2001985
This commit is contained in:
parent
adaf9182ba
commit
24c04d93dd
@ -192,7 +192,7 @@ jsontype = JsonType()
|
|||||||
class JsonPatchType(wtypes.Base):
|
class JsonPatchType(wtypes.Base):
|
||||||
"""A complex type that represents a single json-patch operation."""
|
"""A complex type that represents a single json-patch operation."""
|
||||||
|
|
||||||
path = wtypes.wsattr(wtypes.StringType(pattern='^(/[\w-]+)+$'),
|
path = wtypes.wsattr(wtypes.StringType(pattern='^(/[\\w-]+)+$'),
|
||||||
mandatory=True)
|
mandatory=True)
|
||||||
op = wtypes.wsattr(wtypes.Enum(str, 'add', 'replace', 'remove'),
|
op = wtypes.wsattr(wtypes.Enum(str, 'add', 'replace', 'remove'),
|
||||||
mandatory=True)
|
mandatory=True)
|
||||||
|
@ -33,7 +33,7 @@ class AuthTokenMiddleware(auth_token.AuthProtocol):
|
|||||||
self._ironic_app = app
|
self._ironic_app = app
|
||||||
# TODO(mrda): Remove .xml and ensure that doesn't result in a
|
# TODO(mrda): Remove .xml and ensure that doesn't result in a
|
||||||
# 401 Authentication Required instead of 404 Not Found
|
# 401 Authentication Required instead of 404 Not Found
|
||||||
route_pattern_tpl = '%s(\.json|\.xml)?$'
|
route_pattern_tpl = '%s(\\.json|\\.xml)?$'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.public_api_routes = [re.compile(route_pattern_tpl % route_tpl)
|
self.public_api_routes = [re.compile(route_pattern_tpl % route_tpl)
|
||||||
|
@ -153,7 +153,7 @@ def is_valid_no_proxy(no_proxy):
|
|||||||
"""
|
"""
|
||||||
if not isinstance(no_proxy, six.string_types):
|
if not isinstance(no_proxy, six.string_types):
|
||||||
return False
|
return False
|
||||||
hostname_re = re.compile('(?!-)[A-Z\d-]{1,63}(?<!-)$', re.IGNORECASE)
|
hostname_re = re.compile('(?!-)[A-Z\\d-]{1,63}(?<!-)$', re.IGNORECASE)
|
||||||
for hostname in no_proxy.split(','):
|
for hostname in no_proxy.split(','):
|
||||||
hostname = hostname.strip().split(':')[0]
|
hostname = hostname.strip().split(':')[0]
|
||||||
if not hostname:
|
if not hostname:
|
||||||
|
@ -426,8 +426,8 @@ class TaskManager(object):
|
|||||||
|
|
||||||
:param event: the name of the event to process
|
:param event: the name of the event to process
|
||||||
:param callback: optional callback to invoke upon event transition
|
:param callback: optional callback to invoke upon event transition
|
||||||
:param call_args: optional \*args to pass to the callback method
|
:param call_args: optional *args to pass to the callback method
|
||||||
:param call_kwargs: optional \**kwargs to pass to the callback method
|
:param call_kwargs: optional **kwargs to pass to the callback method
|
||||||
:param err_handler: optional error handler to invoke if the
|
:param err_handler: optional error handler to invoke if the
|
||||||
callback fails, eg. because there are no workers available
|
callback fails, eg. because there are no workers available
|
||||||
(err_handler should accept arguments node, prev_prov_state, and
|
(err_handler should accept arguments node, prev_prov_state, and
|
||||||
|
@ -106,7 +106,7 @@ def _validate_sum_components(components):
|
|||||||
"""
|
"""
|
||||||
not_supported = []
|
not_supported = []
|
||||||
for component in components:
|
for component in components:
|
||||||
if not re.search('\.(scexe|exe|rpm)$', component):
|
if not re.search('\\.(scexe|exe|rpm)$', component):
|
||||||
not_supported.append(component)
|
not_supported.append(component)
|
||||||
|
|
||||||
if not_supported:
|
if not_supported:
|
||||||
|
4
tox.ini
4
tox.ini
@ -106,9 +106,9 @@ commands = {posargs}
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# [W503] Line break before binary operator.
|
# [W503] Line break before binary operator.
|
||||||
# NOTE(TheJulia): Adding W605,W606,E501,F405 to the ignore list
|
# NOTE(TheJulia): Adding W606,E501,F405 to the ignore list
|
||||||
# until we are able to clean them up in the code base.
|
# until we are able to clean them up in the code base.
|
||||||
ignore = E129,W503,W605,W606,E501,F405
|
ignore = E129,W503,W606,E501,F405
|
||||||
filename = *.py,app.wsgi
|
filename = *.py,app.wsgi
|
||||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
import-order-style = pep8
|
import-order-style = pep8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user