Skip to content

Commit d7b55d4

Browse files
👌 IMPROVE: Address code review feedback - add comments for resolve() and test semantics
Agent-Logs-Url: https://github.com/useblocks/sphinx-codelinks/sessions/e9503678-3d44-4fee-9eb5-0d065cf4b5af Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
1 parent cf21ceb commit d7b55d4

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/sphinx_codelinks/source_discover/source_discover.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def _discover(self) -> list[Path]:
7070
continue
7171
if self.file_types and filepath.suffix.lower() not in self.file_types:
7272
continue
73+
# resolve() produces canonical absolute paths; follow_links only
74+
# controls whether the walker descends into symlinked directories
7375
discovered_files.append(filepath.resolve())
7476

7577
sorted_filepaths = sorted(

‎tests/test_source_discover.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ def test_schema_positive(config):
130130
"exclude": ["charge/*.cpp"],
131131
"include": ["**/*.cpp"],
132132
},
133+
# With ignore-python, include patterns whitelist files (overriding
134+
# gitignore) and exclude patterns are applied after, so both
135+
# charge/*.cpp files are excluded resulting in 2 instead of 4.
133136
2,
134137
"",
135138
),

0 commit comments

Comments
 (0)