Enabled hacking check H401
* [H401] Docstrings should not start with a space. Change-Id: I1fa248590c7e05ab92b30ae30af1cf107cdd3cc4
This commit is contained in:
parent
d4498bde1e
commit
8af71e9bde
@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class PingCommand(base.GetCommand):
|
class PingCommand(base.GetCommand):
|
||||||
""" Ping a service on a given host """
|
"""Ping a service on a given host"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(PingCommand, self).get_parser(prog_name)
|
parser = super(PingCommand, self).get_parser(prog_name)
|
||||||
|
@ -23,7 +23,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class ListDomainsCommand(base.ListCommand):
|
class ListDomainsCommand(base.ListCommand):
|
||||||
""" List Domains """
|
"""List Domains"""
|
||||||
|
|
||||||
columns = ['id', 'name', 'serial']
|
columns = ['id', 'name', 'serial']
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class ListDomainsCommand(base.ListCommand):
|
|||||||
|
|
||||||
|
|
||||||
class GetDomainCommand(base.GetCommand):
|
class GetDomainCommand(base.GetCommand):
|
||||||
""" Get Domain """
|
"""Get Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(GetDomainCommand, self).get_parser(prog_name)
|
parser = super(GetDomainCommand, self).get_parser(prog_name)
|
||||||
@ -46,7 +46,7 @@ class GetDomainCommand(base.GetCommand):
|
|||||||
|
|
||||||
|
|
||||||
class CreateDomainCommand(base.CreateCommand):
|
class CreateDomainCommand(base.CreateCommand):
|
||||||
""" Create Domain """
|
"""Create Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(CreateDomainCommand, self).get_parser(prog_name)
|
parser = super(CreateDomainCommand, self).get_parser(prog_name)
|
||||||
@ -74,7 +74,7 @@ class CreateDomainCommand(base.CreateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class UpdateDomainCommand(base.UpdateCommand):
|
class UpdateDomainCommand(base.UpdateCommand):
|
||||||
""" Update Domain """
|
"""Update Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(UpdateDomainCommand, self).get_parser(prog_name)
|
parser = super(UpdateDomainCommand, self).get_parser(prog_name)
|
||||||
@ -111,7 +111,7 @@ class UpdateDomainCommand(base.UpdateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class DeleteDomainCommand(base.DeleteCommand):
|
class DeleteDomainCommand(base.DeleteCommand):
|
||||||
""" Delete Domain """
|
"""Delete Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(DeleteDomainCommand, self).get_parser(prog_name)
|
parser = super(DeleteDomainCommand, self).get_parser(prog_name)
|
||||||
@ -125,7 +125,7 @@ class DeleteDomainCommand(base.DeleteCommand):
|
|||||||
|
|
||||||
|
|
||||||
class ListDomainServersCommand(base.ListCommand):
|
class ListDomainServersCommand(base.ListCommand):
|
||||||
""" List Domain Servers """
|
"""List Domain Servers"""
|
||||||
|
|
||||||
columns = ['name']
|
columns = ['name']
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class ListRecordsCommand(base.ListCommand):
|
class ListRecordsCommand(base.ListCommand):
|
||||||
""" List Records """
|
"""List Records"""
|
||||||
|
|
||||||
columns = ['id', 'type', 'name', 'data']
|
columns = ['id', 'type', 'name', 'data']
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class ListRecordsCommand(base.ListCommand):
|
|||||||
|
|
||||||
|
|
||||||
class GetRecordCommand(base.GetCommand):
|
class GetRecordCommand(base.GetCommand):
|
||||||
""" Get Record """
|
"""Get Record"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(GetRecordCommand, self).get_parser(prog_name)
|
parser = super(GetRecordCommand, self).get_parser(prog_name)
|
||||||
@ -54,7 +54,7 @@ class GetRecordCommand(base.GetCommand):
|
|||||||
|
|
||||||
|
|
||||||
class CreateRecordCommand(base.CreateCommand):
|
class CreateRecordCommand(base.CreateCommand):
|
||||||
""" Create Record """
|
"""Create Record"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(CreateRecordCommand, self).get_parser(prog_name)
|
parser = super(CreateRecordCommand, self).get_parser(prog_name)
|
||||||
@ -89,7 +89,7 @@ class CreateRecordCommand(base.CreateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class UpdateRecordCommand(base.UpdateCommand):
|
class UpdateRecordCommand(base.UpdateCommand):
|
||||||
""" Update Record """
|
"""Update Record"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(UpdateRecordCommand, self).get_parser(prog_name)
|
parser = super(UpdateRecordCommand, self).get_parser(prog_name)
|
||||||
@ -148,7 +148,7 @@ class UpdateRecordCommand(base.UpdateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class DeleteRecordCommand(base.DeleteCommand):
|
class DeleteRecordCommand(base.DeleteCommand):
|
||||||
""" Delete Record """
|
"""Delete Record"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(DeleteRecordCommand, self).get_parser(prog_name)
|
parser = super(DeleteRecordCommand, self).get_parser(prog_name)
|
||||||
|
@ -17,35 +17,35 @@ from designateclient.cli import base
|
|||||||
|
|
||||||
|
|
||||||
class DomainCountCommand(base.GetCommand):
|
class DomainCountCommand(base.GetCommand):
|
||||||
""" Get counts for total domains """
|
"""Get counts for total domains"""
|
||||||
|
|
||||||
def execute(self, parsed_args):
|
def execute(self, parsed_args):
|
||||||
return self.client.reports.count_domains()
|
return self.client.reports.count_domains()
|
||||||
|
|
||||||
|
|
||||||
class RecordCountCommand(base.GetCommand):
|
class RecordCountCommand(base.GetCommand):
|
||||||
""" Get counts for total records """
|
"""Get counts for total records"""
|
||||||
|
|
||||||
def execute(self, parsed_args):
|
def execute(self, parsed_args):
|
||||||
return self.client.reports.count_records()
|
return self.client.reports.count_records()
|
||||||
|
|
||||||
|
|
||||||
class TenantCountCommand(base.GetCommand):
|
class TenantCountCommand(base.GetCommand):
|
||||||
""" Get counts for total tenants """
|
"""Get counts for total tenants"""
|
||||||
|
|
||||||
def execute(self, parsed_args):
|
def execute(self, parsed_args):
|
||||||
return self.client.reports.count_tenants()
|
return self.client.reports.count_tenants()
|
||||||
|
|
||||||
|
|
||||||
class CountsCommand(base.GetCommand):
|
class CountsCommand(base.GetCommand):
|
||||||
""" Get count totals for all tenants, domains and records """
|
"""Get count totals for all tenants, domains and records"""
|
||||||
|
|
||||||
def execute(self, parsed_args):
|
def execute(self, parsed_args):
|
||||||
return self.client.reports.count_all()
|
return self.client.reports.count_all()
|
||||||
|
|
||||||
|
|
||||||
class TenantsCommand(base.ListCommand):
|
class TenantsCommand(base.ListCommand):
|
||||||
""" Get list of tenants and domain count for each """
|
"""Get list of tenants and domain count for each"""
|
||||||
|
|
||||||
columns = ['domain_count', 'id']
|
columns = ['domain_count', 'id']
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class TenantsCommand(base.ListCommand):
|
|||||||
|
|
||||||
|
|
||||||
class TenantCommand(base.ListCommand):
|
class TenantCommand(base.ListCommand):
|
||||||
""" Get a list of domains for given tenant """
|
"""Get a list of domains for given tenant"""
|
||||||
|
|
||||||
columns = ['domain']
|
columns = ['domain']
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class ListServersCommand(base.ListCommand):
|
class ListServersCommand(base.ListCommand):
|
||||||
""" List Servers """
|
"""List Servers"""
|
||||||
|
|
||||||
columns = ['id', 'name']
|
columns = ['id', 'name']
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class ListServersCommand(base.ListCommand):
|
|||||||
|
|
||||||
|
|
||||||
class GetServerCommand(base.GetCommand):
|
class GetServerCommand(base.GetCommand):
|
||||||
""" Get Server """
|
"""Get Server"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(GetServerCommand, self).get_parser(prog_name)
|
parser = super(GetServerCommand, self).get_parser(prog_name)
|
||||||
@ -46,7 +46,7 @@ class GetServerCommand(base.GetCommand):
|
|||||||
|
|
||||||
|
|
||||||
class CreateServerCommand(base.CreateCommand):
|
class CreateServerCommand(base.CreateCommand):
|
||||||
""" Create Server """
|
"""Create Server"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(CreateServerCommand, self).get_parser(prog_name)
|
parser = super(CreateServerCommand, self).get_parser(prog_name)
|
||||||
@ -64,7 +64,7 @@ class CreateServerCommand(base.CreateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class UpdateServerCommand(base.UpdateCommand):
|
class UpdateServerCommand(base.UpdateCommand):
|
||||||
""" Update Server """
|
"""Update Server"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(UpdateServerCommand, self).get_parser(prog_name)
|
parser = super(UpdateServerCommand, self).get_parser(prog_name)
|
||||||
@ -85,7 +85,7 @@ class UpdateServerCommand(base.UpdateCommand):
|
|||||||
|
|
||||||
|
|
||||||
class DeleteServerCommand(base.DeleteCommand):
|
class DeleteServerCommand(base.DeleteCommand):
|
||||||
""" Delete Server """
|
"""Delete Server"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(DeleteServerCommand, self).get_parser(prog_name)
|
parser = super(DeleteServerCommand, self).get_parser(prog_name)
|
||||||
|
@ -21,7 +21,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class SyncAllCommand(base.Command):
|
class SyncAllCommand(base.Command):
|
||||||
""" Sync Everything """
|
"""Sync Everything"""
|
||||||
|
|
||||||
def execute(self, parsed_args):
|
def execute(self, parsed_args):
|
||||||
self.client.sync.sync_all()
|
self.client.sync.sync_all()
|
||||||
@ -30,7 +30,7 @@ class SyncAllCommand(base.Command):
|
|||||||
|
|
||||||
|
|
||||||
class SyncDomainCommand(base.Command):
|
class SyncDomainCommand(base.Command):
|
||||||
""" Sync a single Domain """
|
"""Sync a single Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(SyncDomainCommand, self).get_parser(prog_name)
|
parser = super(SyncDomainCommand, self).get_parser(prog_name)
|
||||||
@ -46,7 +46,7 @@ class SyncDomainCommand(base.Command):
|
|||||||
|
|
||||||
|
|
||||||
class SyncRecordCommand(base.Command):
|
class SyncRecordCommand(base.Command):
|
||||||
""" Sync a single Record """
|
"""Sync a single Record"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(SyncRecordCommand, self).get_parser(prog_name)
|
parser = super(SyncRecordCommand, self).get_parser(prog_name)
|
||||||
|
@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class TouchDomainCommand(base.Command):
|
class TouchDomainCommand(base.Command):
|
||||||
""" Touch a single Domain """
|
"""Touch a single Domain"""
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(TouchDomainCommand, self).get_parser(prog_name)
|
parser = super(TouchDomainCommand, self).get_parser(prog_name)
|
||||||
|
@ -21,7 +21,7 @@ from designateclient import exceptions
|
|||||||
|
|
||||||
|
|
||||||
class Client(object):
|
class Client(object):
|
||||||
""" Client for the Designate v1 API """
|
"""Client for the Designate v1 API"""
|
||||||
|
|
||||||
def __init__(self, endpoint=None, auth_url=None, username=None,
|
def __init__(self, endpoint=None, auth_url=None, username=None,
|
||||||
password=None, tenant_id=None, tenant_name=None, token=None,
|
password=None, tenant_id=None, tenant_name=None, token=None,
|
||||||
|
3
tox.ini
3
tox.ini
@ -36,13 +36,12 @@ commands = {posargs}
|
|||||||
# ignored flake8 codes:
|
# ignored flake8 codes:
|
||||||
# H104 file contains nothing more than comments
|
# H104 file contains nothing more than comments
|
||||||
# H302 import only modules
|
# H302 import only modules
|
||||||
# H401 docstring should not start with a space
|
|
||||||
# H402 one line docstring needs punctuation
|
# H402 one line docstring needs punctuation
|
||||||
# H404 multi line docstring should start with a summary
|
# H404 multi line docstring should start with a summary
|
||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# H904 Wrap long lines in parentheses instead of a backslash
|
||||||
# See designate for other ignored codes that may apply here
|
# See designate for other ignored codes that may apply here
|
||||||
|
|
||||||
ignore = H104,H302,H401,H402,H404,H405,H904
|
ignore = H104,H302,H402,H404,H405,H904
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user