Avoid double loop in subprocess_context.store_patches (#25621)

fixes #21643

As far as I can see the double loop is not needed, since
"patch" is never used and the items in the list are tuples
of three values.
This commit is contained in:
Massimiliano Culpo 2021-08-26 18:46:01 +02:00 committed by GitHub
parent 1ab6f30fdd
commit a3d8e95e76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,7 +139,6 @@ def store_patches():
class_patches = list()
if not patches:
return TestPatches(list(), list())
for patch in patches:
for target, name, _ in patches:
if isinstance(target, ModuleType):
new_val = getattr(target, name)