From d5b835efb8bf0a192e066dd8ec393d0c60a08537 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 16 Jun 2014 19:01:28 -0700 Subject: [PATCH] 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 --- taskflow/examples/resume_from_backend.py | 10 +++++----- tox-tmpl.ini | 3 +-- tox.ini | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/taskflow/examples/resume_from_backend.py b/taskflow/examples/resume_from_backend.py index 6e270408..ef20a160 100644 --- a/taskflow/examples/resume_from_backend.py +++ b/taskflow/examples/resume_from_backend.py @@ -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") diff --git a/tox-tmpl.ini b/tox-tmpl.ini index 08164ecf..2d32f20c 100644 --- a/tox-tmpl.ini +++ b/tox-tmpl.ini @@ -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 diff --git a/tox.ini b/tox.ini index f63a612d..5adee73c 100644 --- a/tox.ini +++ b/tox.ini @@ -68,7 +68,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' commands = {posargs} [flake8] -ignore = H307,H305,H904,E265 +ignore = H307,H305,H904 builtins = _ exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools