1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28249 -- Removed unnecessary dict.keys() calls.

iter(dict) is equivalent to iter(dict.keys()).
This commit is contained in:
Jon Dufresne
2017-05-27 16:08:46 -07:00
committed by Tim Graham
parent 2a5708a304
commit 21046e7773
43 changed files with 84 additions and 85 deletions

View File

@@ -240,7 +240,7 @@ def caches_setting_for_tests(base=None, exclude=None, **params):
# params -> _caches_setting_base -> base
base = base or {}
exclude = exclude or set()
setting = {k: base.copy() for k in _caches_setting_base.keys() if k not in exclude}
setting = {k: base.copy() for k in _caches_setting_base if k not in exclude}
for key, cache_params in setting.items():
cache_params.update(_caches_setting_base[key])
cache_params.update(params)