Removed unneeded list() calls in list.extend() argument.

This commit is contained in:
Sergey Fedoseev 2018-09-25 20:30:43 +05:00 committed by Tim Graham
parent bb81c22d90
commit 553c24018e
3 changed files with 3 additions and 3 deletions

View File

@ -176,7 +176,7 @@ class Apps:
result = [] result = []
for app_config in self.app_configs.values(): for app_config in self.app_configs.values():
result.extend(list(app_config.get_models(include_auto_created, include_swapped))) result.extend(app_config.get_models(include_auto_created, include_swapped))
return result return result
def get_model(self, app_label, model_name=None, require_ready=True): def get_model(self, app_label, model_name=None, require_ready=True):

View File

@ -117,7 +117,7 @@ class ListMixin:
def __iadd__(self, other): def __iadd__(self, other):
'add another list-like object to self' 'add another list-like object to self'
self.extend(list(other)) self.extend(other)
return self return self
def __mul__(self, n): def __mul__(self, n):

View File

@ -298,7 +298,7 @@ class Command(BaseCommand):
continue continue
if os.path.isdir(app_dir): if os.path.isdir(app_dir):
dirs.append(app_dir) dirs.append(app_dir)
dirs.extend(list(fixture_dirs)) dirs.extend(fixture_dirs)
dirs.append('') dirs.append('')
dirs = [os.path.abspath(os.path.realpath(d)) for d in dirs] dirs = [os.path.abspath(os.path.realpath(d)) for d in dirs]
return dirs return dirs