-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default copyright pattern doesn't allow commas #9477
Comments
I think it might be an oversight. We should probably allow commas there. |
PR submitted in #9498. |
I believe this is allowed, at least in my testing: https://play.ruff.rs/b1dc1b2a-afec-48e6-82b5-ce7eb68fbf33. Closing for now but happy to revisit! |
@charliermarsh I think this and #9498 were closed in error, my local testing still shows a need to manually set I think the reason your testing didn't show a problem is because you have to set I can't figure out how to share it, but I verified this by setting the author properly on your link above. |
Ping @charliermarsh |
Ack, will take another look! |
Ping since there's a PR to fix sitting in #9498. |
Thanks, I think you're right, that does it. I'll get it merged now, but need to add tests. |
## Summary Adds commas as an accepted separator between copyright years by default, which is actually documented in one spot, but not currently accurate. Fixes #9477.
Thanks! |
As of ruff 0.1.11, the default
notice-rgx
does not allow for headers that have commas, like:Part of the docs do say that
(?i)Copyright\s+(\(C\)\s+)?\d{4}([-,]\d{4})*
is the default pattern (which works), but there's also(?i)Copyright\s+(\(C\)\s+)?\d{4}(-\d{4})*
mentioned in a separate sentence in the docs and matches what's inCOPYRIGHT
(and reflects actual behavior). Any reason commas shouldn't be accepted?The text was updated successfully, but these errors were encountered: