Unpin flake8, fix lint

Change-Id: Id899936da7721fcc359e63db455a5349603fe559
This commit is contained in:
Frode Nordahl 2020-08-28 16:10:19 +02:00
parent d3bcd92616
commit 65d66ecb58
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
6 changed files with 14 additions and 11 deletions

View File

@ -57,5 +57,6 @@ def openstack_upgrade():
register_configs())):
config_changed()
if __name__ == '__main__':
openstack_upgrade()

View File

@ -128,5 +128,6 @@ def main():
}
return audits.action_parse_results(audits.run(config))
if __name__ == "__main__":
sys.exit(main())

View File

@ -150,6 +150,7 @@ REQUIRED_INTERFACES = {
def ceph_config_file():
return CHARM_CEPH_CONF.format(service_name())
CONFIG_FILES = OrderedDict([
(GLANCE_REGISTRY_CONF, {
'hook_contexts': [context.SharedDBContext(ssl_dir=GLANCE_CONF_DIR),
@ -475,7 +476,7 @@ def check_optional_relations(configs):
if relation_ids('ha'):
try:
get_hacluster_config()
except:
except Exception:
return ('blocked',
'hacluster missing configuration: '
'vip, vip_iface, vip_cidr')

View File

@ -10,7 +10,7 @@
charm-tools>=2.4.4
requests>=2.18.4
mock>=1.2
flake8>=2.2.4,<=2.4.1
flake8>=2.2.4
stestr>=2.2.0
coverage>=4.5.2
pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking)

View File

@ -116,5 +116,5 @@ commands =
functest-run-suite --keep-model --bundle {posargs}
[flake8]
ignore = E402,E226
ignore = E402,E226,W504
exclude = */charmhelpers

View File

@ -26,16 +26,16 @@ sys.modules['apt'] = mock_apt
mock_apt.apt_pkg = MagicMock()
with patch('charmhelpers.contrib.hardening.harden.harden') as mock_dec, \
patch('charmhelpers.contrib.openstack.utils.'
'os_requires_version') as mock_os, \
patch('glance_utils.register_configs'), \
patch('charmhelpers.contrib.openstack.utils.'
'os_requires_version') as mock_os, \
patch('glance_utils.register_configs'), \
patch('glance_utils.restart_map'):
mock_dec.side_effect = (lambda *dargs, **dkwargs: lambda f:
lambda *args, **kwargs: f(*args, **kwargs))
mock_dec.side_effect = (lambda *dargs, **dkwargs: lambda f:
lambda *args, **kwargs: f(*args, **kwargs))
mock_os.side_effect = (lambda *dargs, **dkwargs: lambda f:
lambda *args, **kwargs: f(*args, **kwargs))
import openstack_upgrade
mock_os.side_effect = (lambda *dargs, **dkwargs: lambda f:
lambda *args, **kwargs: f(*args, **kwargs))
import openstack_upgrade
from test_utils import CharmTestCase