Skip to content

Commit

Permalink
fix: Follow symlinks when finding modules
Browse files Browse the repository at this point in the history
Issue-mkdocstrings-python-258: mkdocstrings/python#258
  • Loading branch information
pawamoy committed Mar 1, 2025
1 parent 053bf20 commit 087832f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_griffe/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def _extend_from_pth_files(self) -> None:
self.append_search_path(directory.path)

def _filter_py_modules(self, path: Path) -> Iterator[Path]:
for root, dirs, files in os.walk(path, topdown=True):
for root, dirs, files in os.walk(path, topdown=True, followlinks=True):
# Optimization: modify dirs in-place to exclude `__pycache__` directories.
dirs[:] = [dir for dir in dirs if dir != "__pycache__"]
for relfile in files:
Expand Down

0 comments on commit 087832f

Please sign in to comment.