Fixed H233, H402 PEP8 errors

This commit is contained in:
tengqm 2015-02-02 14:38:59 +08:00
parent c1b26d470f
commit f065d20185
5 changed files with 6 additions and 10 deletions

View File

@ -179,7 +179,7 @@ class ContextMiddleware(wsgi.Middleware):
def ContextMiddleware_filter_factory(global_conf, **local_conf):
'''Factory method for paste.deploy'''
'''Factory method for paste.deploy.'''
conf = global_conf.copy()
conf.update(local_conf)

View File

@ -300,17 +300,17 @@ def action_release(context, action_id, owner):
def action_lock_check(context, action_id, owner=None):
"""Check whether an action has been locked(by a owner)"""
'''Check whether an action has been locked(by a owner).'''
return IMPL.action_lock_check(context, action_id, owner)
def action_control(context, action_id, value):
"""Set action control status to value"""
'''Set action control status to value.'''
return IMPL.action_control(context, action_id, value)
def action_control_check(context, action_id):
"""Get action control status"""
'''Get action control status.'''
return IMPL.action_control_check(context, action_id)

View File

@ -59,7 +59,7 @@ class Dispatcher(service.Service):
return True
def new_action(self, context, action_id=None):
'''New action has been ready, try to schedule it'''
# New action has been ready, try to schedule it
scheduler.start_action(context, action_id, self.engine_id, self.TG)
def cancel_action(self, context, action_id):

View File

@ -12,8 +12,6 @@
import datetime
from oslo_config import cfg
from senlin.db import api as db_api
from senlin.engine import environment
from senlin.openstack.common import log as logging

View File

@ -39,10 +39,8 @@ commands = python setup.py build_sphinx
[flake8]
# E265 block comment should start with '#'
# H233 Python 3.x incompatible use of print operator
# H307 like imports should be grouped together
# H402 one line docstring needs punctuation
ignore = E265,H233,H307,H402
ignore = E265,H307
show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build,*senlin/tests*
max-complexity=20