Fix style error H236
H236: Python 3.x incompatible __metaclass__, use six.add_metaclass() Change-Id: I985bee23b7c81c44e4e40e3f90abd9d21e62c526 Implements: blueprint new-hacking-style-rules
This commit is contained in:
parent
07417b163c
commit
359a18be69
@ -14,6 +14,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
|
||||
import six
|
||||
from stevedore import driver
|
||||
from stevedore import enabled
|
||||
from designate.openstack.common import log as logging
|
||||
@ -22,9 +24,8 @@ from designate.openstack.common import log as logging
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class Plugin(object):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
__plugin_ns__ = None
|
||||
|
||||
__plugin_name__ = None
|
||||
|
@ -14,14 +14,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
from oslo.config import cfg
|
||||
from designate import exceptions
|
||||
from designate.plugin import DriverPlugin
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class Quota(DriverPlugin):
|
||||
""" Base class for quota plugins """
|
||||
__metaclass__ = abc.ABCMeta
|
||||
__plugin_ns__ = 'designate.quota'
|
||||
__plugin_type__ = 'quota'
|
||||
|
||||
|
@ -14,13 +14,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
import six
|
||||
from designate.plugin import DriverPlugin
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class Storage(DriverPlugin):
|
||||
|
||||
""" Base class for storage plugins """
|
||||
__metaclass__ = abc.ABCMeta
|
||||
__plugin_ns__ = 'designate.storage'
|
||||
__plugin_type__ = 'storage'
|
||||
|
||||
|
3
tox.ini
3
tox.ini
@ -38,7 +38,6 @@ commands = {posargs}
|
||||
|
||||
# TODO: The following ignored codes need review
|
||||
# H104 file contains nothing more than comments
|
||||
# H236 Python 3.x incompatible __metaclass__, use six.add_metaclass()
|
||||
# H305 imports not grouped correctly
|
||||
# H307 like imports should be grouped together
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
@ -48,7 +47,7 @@ commands = {posargs}
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E251 unexpected spaces around keyword / parameter equals
|
||||
# E265 Block comment should start with '# '
|
||||
ignore = H104,H236,H302,H305,H306,H307,H401,H402,H404,H405,H904,E111,E126,E128,E251,E265
|
||||
ignore = H104,H302,H305,H306,H307,H401,H402,H404,H405,H904,E111,E126,E128,E251,E265
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user