Skip to content

Commit 0da477f

Browse files
committed
Dedupe __path__ in PathFinder.discover
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 3be757f commit 0da477f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ def discover(cls, parent=None):
13321332
else:
13331333
path = parent.submodule_search_locations
13341334

1335-
for entry in path:
1335+
for entry in set(path):
13361336
if not isinstance(entry, str):
13371337
continue
13381338
if (finder := cls._path_importer_cache(entry)) is None:

0 commit comments

Comments
 (0)