Repository navigation
feat: add correctly spelled ExternalReferenceType.RFC_9116 - #1082
Conversation
`RFC_9166` misspells the RFC number of its value `rfc-9116`. Add `RFC_9116` as an alias of the same member, and keep `RFC_9166` as the canonical name so that nothing breaks. Signed-off-by: buzludeniz <denizalbania@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Documentation build overview
|
ExternalReferenceType.RFC_9116
jkowalleck
left a comment
There was a problem hiding this comment.
I like this non-breaking fix.
Could you fix some nitpicks i had?
Make `RFC_9116` the canonical member and `RFC_9166` its deprecated alias, as asked in review. Both names still resolve to the same member, so existing code keeps working; the member's `name` is now `RFC_9116`. The enum snapshots build each URL from the member's name, so the `tests/RFC_9166` URL in them becomes `tests/RFC_9116`. Signed-off-by: Deniz Ikili <denizalbania@gmail.com>
|
@jkowalleck thanks for the review. Both changes are in cabc4b6: I put the deprecation comment on the line above The enum snapshot tests build each URL from the member's name, so 13 snapshot files changed from |
Move the deprecation comment to the end of the `RFC_9166` line, as asked in review. The line is longer than flake8's 120 characters, so it carries `# noqa: E501`. A second comment line aligned under the first fails flake8's E114 and E116, so the note stays on one line. Signed-off-by: Deniz Ikili <denizalbania@gmail.com>
|
Thanks for the reviews and for getting it into 11.14.0. |
Description
ExternalReferenceType.RFC_9166holds the valuerfc-9116(thesecurity.txtRFC), but its name has the RFCnumber wrong. As noted in the issue, renaming the member would be a breaking change, so this PR adds the correct
name as an enum alias instead:
ExternalReferenceType.RFC_9116is the same member asRFC_9166: same value, the same object, and found byvalue (
ExternalReferenceType('rfc-9116')) and by name.RFC_9166stays the canonical name, so iteration,.name, serialization and thetest snapshots are unchanged.
RFC_9116. Making it the canonical name (and droppingRFC_9166) couldwait for the next major version.
_ExternalReferenceSerializationHelpernow usesRFC_9116.TestEnumExternalReferenceType.test_rfc_9116_is_alias_of_rfc_9166.The full test suite passes, and so do flake8, mypy, isort, bandit and deptry.
Resolves or fixes issue: #1074
AI Tool Disclosure
Claude CodeClaude Opus 5.5Find a small open issue and fix it without a breaking change; add a test; run the test suite and the linters. The change and this description were reviewed by me before submitting.Affirmation