Bump to hacking 2.x
This allows us to use a new version of flake8 that supports Python 3-only syntax. Existing issues are resolved. Change-Id: I5de7e5cde6a5260f4e7e57586952256b59d3756d Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
da7cd17a2b
commit
298c5107eb
@ -40,6 +40,7 @@ class IOTLightbulb(base.VersionedObject):
|
||||
'manufactured_on': obj_fields.DateTimeField(),
|
||||
}
|
||||
|
||||
|
||||
# Now do some basic operations on a light bulb.
|
||||
bulb = IOTLightbulb(serial='abc-123', manufactured_on=datetime.now())
|
||||
print("The __str__() output of this new object: %s" % bulb)
|
||||
|
@ -1255,8 +1255,7 @@ class CoercedList(CoercedCollectionMixin, list):
|
||||
super(CoercedList, self).append(self._coerce_item(len(self) + 1, x))
|
||||
|
||||
def extend(self, t):
|
||||
l = len(self)
|
||||
coerced_items = [self._coerce_item(l + index, item)
|
||||
coerced_items = [self._coerce_item(len(self) + index, item)
|
||||
for index, item in enumerate(t)]
|
||||
super(CoercedList, self).extend(coerced_items)
|
||||
|
||||
@ -1264,8 +1263,7 @@ class CoercedList(CoercedCollectionMixin, list):
|
||||
super(CoercedList, self).insert(i, self._coerce_item(i, x))
|
||||
|
||||
def __iadd__(self, y):
|
||||
l = len(self)
|
||||
coerced_items = [self._coerce_item(l + index, item)
|
||||
coerced_items = [self._coerce_item(len(self) + index, item)
|
||||
for index, item in enumerate(y)]
|
||||
return super(CoercedList, self).__iadd__(coerced_items)
|
||||
|
||||
|
@ -95,6 +95,7 @@ def _patch_mock_to_raise_for_invalid_assert_calls():
|
||||
mock.Mock.__getattr__ = raise_for_invalid_assert_calls(
|
||||
mock.Mock.__getattr__)
|
||||
|
||||
|
||||
# NOTE(gibi): needs to be called only once at import time
|
||||
# to patch the mock lib
|
||||
_patch_mock_to_raise_for_invalid_assert_calls()
|
||||
|
@ -1,7 +1,7 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
hacking>=2.0.0,<2.1.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
testtools>=2.2.0 # MIT
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user