[referenced_patterns] don't visit tops twice

This commit is contained in:
Jan Petykiewicz 2026-04-06 15:30:37 -07:00
commit c501a8ff99

View file

@ -180,6 +180,8 @@ class ILibraryView(Mapping[str, 'Pattern'], metaclass=ABCMeta):
if isinstance(tops, str):
tops = (tops,)
tops = set(tops)
skip |= tops # don't re-visit tops
# Get referenced patterns for all tops
targets = set()