mirror of https://github.com/django/django.git
Refs #32355 -- Removed unnecessary list() calls before reversed() on dictviews.
Dict and dictviews are iterable in reversed insertion order using reversed() in Python 3.8+.
This commit is contained in:
parent
4c60c3edff
commit
7346c288e3
|
@ -68,7 +68,7 @@ def get_commands():
|
|||
if not settings.configured:
|
||||
return commands
|
||||
|
||||
for app_config in reversed(list(apps.get_app_configs())):
|
||||
for app_config in reversed(apps.get_app_configs()):
|
||||
path = os.path.join(app_config.path, 'management')
|
||||
commands.update({name: app_config.name for name in find_commands(path)})
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ class DjangoTranslation(gettext_module.GNUTranslations):
|
|||
def _add_installed_apps_translations(self):
|
||||
"""Merge translations from each installed app."""
|
||||
try:
|
||||
app_configs = reversed(list(apps.get_app_configs()))
|
||||
app_configs = reversed(apps.get_app_configs())
|
||||
except AppRegistryNotReady:
|
||||
raise AppRegistryNotReady(
|
||||
"The translation infrastructure cannot be initialized before the "
|
||||
|
|
Loading…
Reference in New Issue