Fix PEP8 failures for H236, remove unneeded ignores, use newer hacking
Fix [H236] Use six.add_metaclass instead of __metaclass__. Remove ignoring of: H233, H234, and H236 as they are passing. Use hacking>=1.0.0 Change-Id: I310f1161467339c6784bae253e0e3713f23d5218
This commit is contained in:
parent
9b1464ad33
commit
7e9e1e5c44
@ -49,8 +49,6 @@ class EmailWorkerBase(EmailPluginBase, WorkerTaskBase):
|
|||||||
building emails off of our event queue.
|
building emails off of our event queue.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__metaclass__ = abc.ABCMeta
|
|
||||||
|
|
||||||
def handle(self, session, author, method, url, path, query_string, status,
|
def handle(self, session, author, method, url, path, query_string, status,
|
||||||
resource, resource_id, sub_resource=None, sub_resource_id=None,
|
resource, resource_id, sub_resource=None, sub_resource_id=None,
|
||||||
resource_before=None, resource_after=None):
|
resource_before=None, resource_after=None):
|
||||||
|
@ -19,6 +19,7 @@ from threading import Timer
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
import six
|
||||||
|
|
||||||
import storyboard.db.api.base as db_api
|
import storyboard.db.api.base as db_api
|
||||||
from storyboard.notifications.notification_hook import class_mappings
|
from storyboard.notifications.notification_hook import class_mappings
|
||||||
@ -157,11 +158,10 @@ class PerpetualTimer(object):
|
|||||||
self.thread.cancel()
|
self.thread.cancel()
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class WorkerTaskBase(PluginBase):
|
class WorkerTaskBase(PluginBase):
|
||||||
"""Base class for a worker that listens to API Events."""
|
"""Base class for a worker that listens to API Events."""
|
||||||
|
|
||||||
__metaclass__ = abc.ABCMeta
|
|
||||||
|
|
||||||
def event(self, author_id, method, url, path, query_string, status,
|
def event(self, author_id, method, url, path, query_string, status,
|
||||||
resource, resource_id, sub_resource=None, sub_resource_id=None,
|
resource, resource_id, sub_resource=None, sub_resource_id=None,
|
||||||
resource_before=None, resource_after=None):
|
resource_before=None, resource_after=None):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
hacking>=0.11.0,<0.12
|
hacking>=1.0.0
|
||||||
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
fixtures>=0.3.14
|
fixtures>=0.3.14
|
||||||
|
7
tox.ini
7
tox.ini
@ -46,12 +46,9 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|||||||
# E125 and E128 are ignored on purpose, they are invalid pep8
|
# E125 and E128 are ignored on purpose, they are invalid pep8
|
||||||
# The following rules should either be addressed or determined to be
|
# The following rules should either be addressed or determined to be
|
||||||
# skippable long term.
|
# skippable long term.
|
||||||
# H405 is ignored to make switch to newer hacking easier
|
|
||||||
# H234 is ignored to make switch to newer hacking easier
|
|
||||||
# H233 is ignored to make switch to newer hacking easier
|
|
||||||
# E265 is ignored to make switch to newer hacking easier
|
# E265 is ignored to make switch to newer hacking easier
|
||||||
# H236 is ignored to make switch to newer hacking easier
|
# H405 is ignored to make switch to newer hacking easier
|
||||||
ignore = E125,E128,H405,H234,H233,E265,H236
|
ignore = E125,E128,E265,H405
|
||||||
builtins = _
|
builtins = _
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user