mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
This commit is contained in:
@@ -82,7 +82,7 @@ def lazy(func, *resultclasses):
|
||||
def __prepare_class__(cls):
|
||||
for resultclass in resultclasses:
|
||||
for type_ in resultclass.mro():
|
||||
for method_name in type_.__dict__.keys():
|
||||
for method_name in type_.__dict__:
|
||||
# All __promise__ return the same wrapper method, they
|
||||
# look up the correct implementation when called.
|
||||
if hasattr(cls, method_name):
|
||||
|
||||
Reference in New Issue
Block a user