diff --git a/lower-constraints.txt b/lower-constraints.txt index ecdd65e1..03572e1c 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -25,11 +25,9 @@ eventlet==0.18.2 extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 -flake8==2.5.5 funcsigs==1.0.0 futurist==1.2.0 greenlet==0.4.10 -hacking==0.12.0 horizon==17.1.0 idna==2.6 imagesize==0.7.1 @@ -72,14 +70,12 @@ osprofiler==1.4.0 Paste==2.0.2 PasteDeploy==1.5.0 pbr==2.0.0 -pep8==1.5.7 pika-pool==0.1.3 pika==0.10.0 Pint==0.5 positional==1.2.1 prettytable==0.7.2 pycparser==2.18 -pyflakes==0.8.1 Pygments==2.2.0 pyinotify==0.9.6 pymongo==3.0.2 diff --git a/monitoring/alarms/forms.py b/monitoring/alarms/forms.py index 0ea14939..9424b780 100644 --- a/monitoring/alarms/forms.py +++ b/monitoring/alarms/forms.py @@ -65,7 +65,7 @@ class SimpleExpressionWidget(django_forms.MultiWidget): def decompress(self, expr): if expr: - return re.search('^(\w+)\((.*)\) ([<>=]*) (.*)$', expr).groups() + return re.search(r'^(\w+)\((.*)\) ([<>=]*) (.*)$', expr).groups() else: return [None, None, None, None] diff --git a/monitoring/dashboard.py b/monitoring/dashboard.py index 99523b05..e941d5df 100644 --- a/monitoring/dashboard.py +++ b/monitoring/dashboard.py @@ -26,4 +26,5 @@ class Monitoring(horizon.Dashboard): policy_rules = (("monitoring", "monitoring:monitoring"),) permissions = (('openstack.services.' + settings.MONITORING_SERVICE_TYPE),) + horizon.register(Monitoring) diff --git a/monitoring/notifications/constants.py b/monitoring/notifications/constants.py index e21ee06e..4ac463c6 100644 --- a/monitoring/notifications/constants.py +++ b/monitoring/notifications/constants.py @@ -21,6 +21,7 @@ class NotificationType(object): WEBHOOK = "WEBHOOK" PAGERDUTY = "PAGERDUTY" + EMAIL_VALIDATOR = validators.EmailValidator( message=_("Address must contain a valid email address.")) WEBHOOK_VALIDATOR = validators.URLValidator( diff --git a/test-requirements.txt b/test-requirements.txt index 2ffd7959..03af7ac4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # Hacking already pins down pep8, pyflakes and flake8 -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD diff --git a/tools/install_venv.py b/tools/install_venv.py index 547a4470..6675cc8c 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -22,6 +22,8 @@ Installation script for the OpenStack Dashboard development virtualenv. """ +# flake8: noqa + from __future__ import print_function import os diff --git a/tox.ini b/tox.ini index d6a5a7f6..044c83de 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,9 @@ commands = /bin/bash run_tests.sh -N --coverage {posargs} [flake8] # F405 TEMPLATES may be undefined, or defined from star imports # (because it is not easy to avoid this in openstack_dashboard.test.settings) -ignore = F405 +# W504 line break after binary operator +# (we use W503 instead) +ignore = F405,W504 max-line-length = 100 builtins = _ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*