Fix author detection for compact dotted names (#4229) - #5308
Fix author detection for compact dotted names (#4229)#5308Hrithikcrick wants to merge 2 commits into
Conversation
Signed-off-by: Hrithik Sharma <sharmahrithik2806@gmail.com>
Signed-off-by: Hrithik Sharma <sharmahrithik2806@gmail.com>
|
Updated after CI validation: the broad dotted-name lexer behavior was removed and the handling is now scoped to Author context. The previously failing license-validation shards pass locally, the full Azure build now succeeds with 0 errors, and ReadTheDocs is green. The remaining GitHub Actions workflows are awaiting maintainer approval. Ready for review. Thanks! |
Shriprasad-P
left a comment
There was a problem hiding this comment.
Review
PR: Fix author detection for compact dotted names (#4229)
Touched: src/cluecode/copyrights.py, tests/cluecode/test_copyrights_basic.py
- Addresses a concrete correctness/reliability issue based on the title and diff.
- Includes or touches tests — good for locking the behavior.
- Security-sensitive change — please double-check edge cases and defaults.
- Size looks manageable (+32/-0).
Commenting as a drive-by reviewer after reading the diff. Happy to look again if maintainers want a deeper pass on a specific file.
|
Thanks a lot for taking the time to review this PR and for the helpful feedback! I've tried to keep the change narrowly scoped and added tests to cover the intended compact dotted-name behavior while preserving the existing behavior. I also appreciate the note about this being security-sensitive. I'll double-check the edge cases and defaults carefully to make sure the change doesn't introduce regressions in author detection. If you noticed any specific edge case or scenario that you think should be covered additionally, I'd be happy to add a regression test for it. Thanks again for the review! |
Fixes #4229
Summary
Fixes author detection for compact dotted author declarations such as:
The implementation is intentionally scoped to author-tag context so unrelated dotted tokens are not globally classified as names.
Changes
Author:declarations before tokenization.Authortag.Testing
git diff --check: clean.Files changed
src/cluecode/copyrights.pytests/cluecode/test_copyrights_basic.py