Fix E265 hacking warnings
Adjust the example code to comply with the new E265 hacking check. This check warns about the following: * E265 block comment should start with '# ' Change-Id: I77aaf8c0bbc50bad9646f8192b1e1b80cf0afc8c
This commit is contained in:
@@ -56,7 +56,7 @@ import example_utils # noqa
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
### UTILITY FUNCTIONS #########################################
|
# UTILITY FUNCTIONS #########################################
|
||||||
|
|
||||||
|
|
||||||
def print_wrapped(text):
|
def print_wrapped(text):
|
||||||
@@ -82,7 +82,7 @@ def find_flow_detail(backend, lb_id, fd_id):
|
|||||||
return lb.find(fd_id)
|
return lb.find(fd_id)
|
||||||
|
|
||||||
|
|
||||||
### CREATE FLOW ###############################################
|
# CREATE FLOW ###############################################
|
||||||
|
|
||||||
|
|
||||||
class InterruptTask(task.Task):
|
class InterruptTask(task.Task):
|
||||||
@@ -104,12 +104,12 @@ def flow_factory():
|
|||||||
TestTask(name='second'))
|
TestTask(name='second'))
|
||||||
|
|
||||||
|
|
||||||
### INITIALIZE PERSISTENCE ####################################
|
# INITIALIZE PERSISTENCE ####################################
|
||||||
|
|
||||||
with example_utils.get_backend() as backend:
|
with example_utils.get_backend() as backend:
|
||||||
logbook = p_utils.temporary_log_book(backend)
|
logbook = p_utils.temporary_log_book(backend)
|
||||||
|
|
||||||
### CREATE AND RUN THE FLOW: FIRST ATTEMPT ####################
|
# CREATE AND RUN THE FLOW: FIRST ATTEMPT ####################
|
||||||
|
|
||||||
flow = flow_factory()
|
flow = flow_factory()
|
||||||
flowdetail = p_utils.create_flow_detail(flow, logbook, backend)
|
flowdetail = p_utils.create_flow_detail(flow, logbook, backend)
|
||||||
@@ -121,7 +121,7 @@ with example_utils.get_backend() as backend:
|
|||||||
engine.run()
|
engine.run()
|
||||||
print_task_states(flowdetail, "After running")
|
print_task_states(flowdetail, "After running")
|
||||||
|
|
||||||
### RE-CREATE, RESUME, RUN ####################################
|
# RE-CREATE, RESUME, RUN ####################################
|
||||||
|
|
||||||
print_wrapped("Resuming and running again")
|
print_wrapped("Resuming and running again")
|
||||||
|
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E265 block comment should start with '# '
|
|
||||||
# H305 imports not grouped correctly
|
# H305 imports not grouped correctly
|
||||||
# H307 like imports should be grouped together
|
# H307 like imports should be grouped together
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# H904 Wrap long lines in parentheses instead of a backslash
|
||||||
ignore = H307,H305,H904,E265
|
ignore = H307,H305,H904
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
||||||
|
|
||||||
|
|||||||
2
tox.ini
2
tox.ini
@@ -68,7 +68,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = H307,H305,H904,E265
|
ignore = H307,H305,H904
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user