fix: accept scalar exclude paths #24
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/forgejo-auto-pr-review!24
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-23-exclude-paths-string"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #23
Accept
review.exclude_pathsas a YAML list, a single path string, or comma-separated path strings. Invalid types now receive an error that names the accepted forms.Validation:
python3 -m unittest discover -s tests(42 tests);nix flake check.Automated code review
Reviewed commit:
3d0ada386381cf84a0e76a79df1815242af866b6Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The pull request introduces
normalize_exclude_pathsto support scalar strings, comma-separated strings, and YAML lists forreview.exclude_paths, replacing inline validation inmain(). Documentation is updated to reflect the new input formats. Unit tests cover valid inputs, whitespace trimming, empty string filtering, and invalid type rejection.Blocking findings
None.
Important findings
None.
Suggestions
if isinstance(value, list) and all(isinstance(pattern, str) for pattern in value):
Impact: Strictly checking for
listmay reject valid sequence types like tuples if YAML parsing or internal config structures change.Suggested fix: Consider using
isinstance(value, (list, tuple))or checking againstcollections.abc.Sequencewhile explicitly excluding strings to improve type flexibility without compromising safety.Tests and validation
Questions
listobjects, or could they occasionally be tuples/other sequences depending on the YAML library version?Review limitations
Diff coverage
README.md: reviewed — included in a context-limited batchreviewer.py: reviewed — included in a context-limited batchtests/test_reviewer.py: reviewed — included in a context-limited batchReview metadata
Final review assessment: no blocking or important findings remain. I am not extending
exclude_pathsto tuples or arbitrary sequences: the supported YAML subset and JSON configuration formats both produce Python lists, which is the deliberate public configuration contract. The PR is ready to merge.