diff --git a/manila_ui/dashboards/admin/share_types/forms.py b/manila_ui/dashboards/admin/share_types/forms.py index 9ce22acd..d12911e3 100644 --- a/manila_ui/dashboards/admin/share_types/forms.py +++ b/manila_ui/dashboards/admin/share_types/forms.py @@ -69,8 +69,8 @@ class CreateShareType(forms.SelfHandlingForm): msg = _("Expected only pairs of key=value.") raise ValidationError(message=msg) - is_public = (self.enable_public_share_type_creation - and data["is_public"]) + is_public = (self.enable_public_share_type_creation and + data["is_public"]) share_type = manila.share_type_create( request, data["name"], spec_dhss, is_public=is_public) if set_dict: diff --git a/manila_ui/dashboards/project/share_networks/forms.py b/manila_ui/dashboards/project/share_networks/forms.py index 4fd68c10..82d6b7fa 100644 --- a/manila_ui/dashboards/project/share_networks/forms.py +++ b/manila_ui/dashboards/project/share_networks/forms.py @@ -124,8 +124,8 @@ class AddSecurityServiceForm(forms.SelfHandlingForm): request, *args, **kwargs) sec_services_choices = manila.security_service_list(request) self.fields['sec_service'].choices = [(' ', ' ')] + \ - [(choice.id, choice.name - or choice.id) for choice in + [(choice.id, choice.name or + choice.id) for choice in sec_services_choices] def handle(self, request, data): diff --git a/test-requirements.txt b/test-requirements.txt index 3b83051d..c3160e26 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!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT mock>=2.0.0 # BSD diff --git a/tox.ini b/tox.ini index 9fb03f9b..7fe43d86 100644 --- a/tox.ini +++ b/tox.ini @@ -80,8 +80,10 @@ commands = oslo_debug_helper {posargs} [flake8] show-source = True # E123, E125 skipped as they are invalid PEP-8. +# F405 TEMPLATES may be undefined, or defined from star imports +# (because it is not easy to avoid this in openstack_dashboard.test.settings) # H405 multi line docstring summary not separated with an empty line -ignore = E123,E125,H405 +ignore = E123,E125,F405,H405 enable-extensions = H203,H106 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools