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:
parent
d9e970b338
commit
d5b835efb8
@ -56,7 +56,7 @@ import example_utils # noqa
|
||||
#
|
||||
|
||||
|
||||
### UTILITY FUNCTIONS #########################################
|
||||
# UTILITY FUNCTIONS #########################################
|
||||
|
||||
|
||||
def print_wrapped(text):
|
||||
@ -82,7 +82,7 @@ def find_flow_detail(backend, lb_id, fd_id):
|
||||
return lb.find(fd_id)
|
||||
|
||||
|
||||
### CREATE FLOW ###############################################
|
||||
# CREATE FLOW ###############################################
|
||||
|
||||
|
||||
class InterruptTask(task.Task):
|
||||
@ -104,12 +104,12 @@ def flow_factory():
|
||||
TestTask(name='second'))
|
||||
|
||||
|
||||
### INITIALIZE PERSISTENCE ####################################
|
||||
# INITIALIZE PERSISTENCE ####################################
|
||||
|
||||
with example_utils.get_backend() as 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()
|
||||
flowdetail = p_utils.create_flow_detail(flow, logbook, backend)
|
||||
@ -121,7 +121,7 @@ with example_utils.get_backend() as backend:
|
||||
engine.run()
|
||||
print_task_states(flowdetail, "After running")
|
||||
|
||||
### RE-CREATE, RESUME, RUN ####################################
|
||||
# RE-CREATE, RESUME, RUN ####################################
|
||||
|
||||
print_wrapped("Resuming and running again")
|
||||
|
||||
|
@ -39,11 +39,10 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# E265 block comment should start with '# '
|
||||
# H305 imports not grouped correctly
|
||||
# H307 like imports should be grouped together
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = H307,H305,H904,E265
|
||||
ignore = H307,H305,H904
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user