diff --git a/bilean/common/config.py b/bilean/common/config.py index a78f5aa..d9c05a5 100644 --- a/bilean/common/config.py +++ b/bilean/common/config.py @@ -45,7 +45,7 @@ service_opts = [ cfg.StrOpt('environment_dir', default='/etc/bilean/environments', help=_('The directory to search for environment files.')), - ] +] rpc_opts = [ cfg.StrOpt('host', @@ -69,7 +69,7 @@ authentication_opts = [ help=_('Name of the domain for the service user.')), cfg.StrOpt('service_project_domain', default='Default', help=_('Name of the domain for the service project.')), - ] +] clients_group = cfg.OptGroup('clients') clients_opts = [ diff --git a/bilean/common/utils.py b/bilean/common/utils.py index 4bb73b7..f172f72 100644 --- a/bilean/common/utils.py +++ b/bilean/common/utils.py @@ -145,7 +145,7 @@ def random_name(length=8): lead = random.choice(string.ascii_letters) tail = ''.join(random.choice(string.ascii_letters + string.digits) - for i in range(length-1)) + for i in range(length - 1)) return lead + tail diff --git a/bilean/engine/scheduler.py b/bilean/engine/scheduler.py index e5734bb..19d05e1 100644 --- a/bilean/engine/scheduler.py +++ b/bilean/engine/scheduler.py @@ -49,7 +49,7 @@ bilean_task_opts = [ cfg.StrOpt('connection', help='The SQLAlchemy connection string used to connect to the ' 'database') - ] +] bilean_task_group = cfg.OptGroup('bilean_task') cfg.CONF.register_group(bilean_task_group) diff --git a/bilean/notification/converter.py b/bilean/notification/converter.py index fe8fc13..9fd1468 100644 --- a/bilean/notification/converter.py +++ b/bilean/notification/converter.py @@ -160,8 +160,8 @@ class EventDefinition(object): return False def match_type(self, event_type): - return (self.included_type(event_type) - and not self.excluded_type(event_type)) + return (self.included_type(event_type) and + not self.excluded_type(event_type)) @property def is_catchall(self): diff --git a/tox.ini b/tox.ini index a201b30..8cefa89 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ commands = {posargs} commands = python setup.py build_sphinx [flake8] -ignore = +ignore = E731 exclude = .venv,.git,.tox,cover,dist,*lib/python*,*egg,tools,build max-complexity=20