Only return packages once.
This commit is contained in:
parent
7547b28dfd
commit
c52ddccd17
1 changed files with 3 additions and 1 deletions
|
@ -270,7 +270,9 @@ def get_packages_for_paths(
|
|||
candidates: List[str] = list()
|
||||
for path in paths:
|
||||
for searcher in searchers:
|
||||
candidates.extend(searcher.search_files(path, regex=regex))
|
||||
for pkg in searcher.search_files(path, regex=regex):
|
||||
if pkg not in candidates:
|
||||
candidates.append(pkg)
|
||||
return candidates
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue