mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Remove else clause that would always be triggered
The else clause of a for loop is executed unless a break statement is executed to terminate the for loop. https://docs.python.org/3/reference/compound_stmts.html#the-for-statement
This commit is contained in:
committed by
Oz N Tiram
parent
7bb23b9a37
commit
37b39330bf
@@ -78,14 +78,16 @@ def get_source_list(
|
||||
if extra_indexes:
|
||||
if isinstance(extra_indexes, str):
|
||||
extra_indexes = [extra_indexes]
|
||||
|
||||
for source in extra_indexes:
|
||||
extra_src = get_project_index(project, source)
|
||||
if not sources or extra_src["url"] != sources[0]["url"]:
|
||||
sources.append(extra_src)
|
||||
else:
|
||||
for source in project.pipfile_sources:
|
||||
if not sources or source["url"] != sources[0]["url"]:
|
||||
sources.append(source)
|
||||
|
||||
for source in project.pipfile_sources:
|
||||
if not sources or source["url"] != sources[0]["url"]:
|
||||
sources.append(source)
|
||||
|
||||
if not sources:
|
||||
sources = project.pipfile_sources[:]
|
||||
if pypi_mirror:
|
||||
|
||||
Reference in New Issue
Block a user