Skip to content

Commit c09a12e

Browse files
committed
Dedupe when package exists with multiple suffixes
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 469dc2a commit c09a12e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,11 +1501,11 @@ def _find_children(self):
15011501
yield entry.name
15021502
# files
15031503
if entry.is_file():
1504-
yield from [
1504+
yield from {
15051505
entry.name.removesuffix(suffix)
15061506
for suffix, _ in self._loaders
15071507
if entry.name.endswith(suffix)
1508-
]
1508+
}
15091509
except OSError:
15101510
pass # ignore exceptions from next(scan_iterator) and os.DirEntry
15111511
except StopIteration:

0 commit comments

Comments
 (0)