From 4e93d50aa2a9793e74f64833da0bb5f896e83e79 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 12 Jun 2024 05:05:46 -0700 Subject: [PATCH] module files: discover files in symlinked folders (#152) Discover files in symlinked folders --- AUTHORS.rst | 3 ++- CHANGELOG.rst | 1 + src/grimp/adaptors/filesystem.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index b9e0bb1c..5059f21b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -6,4 +6,5 @@ Authors * Kevin Amado - https://github.com/kamadorueda * Matthew Gamble - https://github.com/mwgamble * NetworkX developers - The shortest path algorithm was adapted from the NetworkX library https://networkx.org/. -* Peter Byfield - https://github.com/Peter554 \ No newline at end of file +* Peter Byfield - https://github.com/Peter554 +* Shane Smiskol - https://github.com/sshane diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ff890ba8..428b381b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,7 @@ latest * Include wheel for Python 3.13.0-beta.1 in release. * Upgrade PyO3 to 0.21. +* Follow symbolic links while walking through module files 3.2 (2024-1-8) -------------- diff --git a/src/grimp/adaptors/filesystem.py b/src/grimp/adaptors/filesystem.py index f18cef57..9f637982 100644 --- a/src/grimp/adaptors/filesystem.py +++ b/src/grimp/adaptors/filesystem.py @@ -18,7 +18,7 @@ def dirname(self, filename: str) -> str: return os.path.dirname(filename) def walk(self, directory_name: str) -> Iterator[Tuple[str, List[str], List[str]]]: - yield from os.walk(directory_name) + yield from os.walk(directory_name, followlinks=True) def join(self, *components: str) -> str: return os.path.join(*components)