Merge "Update hacking version"

This commit is contained in:
Zuul 2019-01-28 18:55:39 +00:00 committed by Gerrit Code Review
commit 49582f902c
3 changed files with 17 additions and 15 deletions

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.11,>=0.10.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage>=3.6
ddt>=0.7.0
mock>=1.2

View File

@ -50,7 +50,9 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[flake8]
show-source = True
# 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 = H405
ignore = F405,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools,releasenotes,.tmp

View File

@ -84,9 +84,9 @@ class RestartInstance(tables.BatchAction):
classes = ('btn-danger', 'btn-reboot')
def allowed(self, request, instance=None):
return ((instance.status in ACTIVE_STATES
or instance.status == 'SHUTDOWN'
or instance.status == 'RESTART_REQUIRED'))
return ((instance.status in ACTIVE_STATES or
instance.status == 'SHUTDOWN' or
instance.status == 'RESTART_REQUIRED'))
def action(self, request, obj_id):
api.trove.instance_restart(request, obj_id)
@ -113,8 +113,8 @@ class DetachReplica(tables.BatchAction):
classes = ('btn-danger', 'btn-detach-replica')
def allowed(self, request, instance=None):
return (instance.status in ACTIVE_STATES
and hasattr(instance, 'replica_of'))
return (instance.status in ACTIVE_STATES and
hasattr(instance, 'replica_of'))
def action(self, request, obj_id):
api.trove.instance_detach_replica(request, obj_id)
@ -127,8 +127,8 @@ class PromoteToReplicaSource(tables.LinkAction):
classes = ("ajax-modal", "btn-promote-to-replica-source")
def allowed(self, request, instance=None):
return (instance.status in ACTIVE_STATES
and hasattr(instance, 'replica_of'))
return (instance.status in ACTIVE_STATES and
hasattr(instance, 'replica_of'))
def get_link_url(self, datum):
instance_id = self.table.get_object_id(datum)
@ -156,8 +156,8 @@ class EjectReplicaSource(tables.BatchAction):
classes = ('btn-danger', 'btn-eject-replica-source')
def _allowed(self, request, instance=None):
return (instance.status != 'PROMOTE'
and hasattr(instance, 'replicas'))
return (instance.status != 'PROMOTE' and
hasattr(instance, 'replicas'))
def action(self, request, obj_id):
api.trove.eject_replica_source(request, obj_id)
@ -436,8 +436,8 @@ class ResizeInstance(tables.LinkAction):
classes = ("ajax-modal", "btn-resize")
def allowed(self, request, instance=None):
return ((instance.status in ACTIVE_STATES
or instance.status == 'SHUTOFF'))
return ((instance.status in ACTIVE_STATES or
instance.status == 'SHUTOFF'))
def get_link_url(self, datum):
instance_id = self.table.get_object_id(datum)
@ -451,8 +451,8 @@ class AttachConfiguration(tables.LinkAction):
classes = ("btn-attach-config", "ajax-modal")
def allowed(self, request, instance=None):
return (instance.status in ACTIVE_STATES
and not hasattr(instance, 'configuration'))
return (instance.status in ACTIVE_STATES and
not hasattr(instance, 'configuration'))
class DetachConfiguration(tables.BatchAction):