Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Idf29433557f48425ba08565cdccbaf06b1acb785
This commit is contained in:
jacky06 2019-01-04 23:25:57 +08:00
parent 13681f910e
commit c4df2c9c5b
4 changed files with 8 additions and 6 deletions

View File

@ -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:

View File

@ -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):

View File

@ -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

View File

@ -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