fix: subject_type for "foo:bar" event tags#19998
Conversation
EventTagEnum.subject_type for "foo:bar" tags
EventTagEnum.subject_type for "foo:bar" tagssubject_type for "foo:bar" event tags
subject_type for "foo:bar" event tagssubject_type for "foo:bar" event tags
miketheman
left a comment
There was a problem hiding this comment.
How does this manifest? Feels odd to see a fix like this with no failing or updated tests?
|
@miketheman I don’t think it actually manifests. I contributed to pypi/warehouse awhile back and was reading the code again as a reference for a different project I’m working on. Just happened to spot this typo. Does the fix look sensible as is? Would we want to add tests, or perhaps remove |
I'm thinking that if we don't actually make the distinction anywhere, and use it as the raw string, the parsing/assignment could be removed? But on the off chance we do use it in some weird way, it's probably safer to keep it, so adding tests is a better approach - maybe the tests would show the intended usage. |
The
EventTagEnumdocstring indicates that omittedsubject_typeshould fallback tosource_type:warehouse/warehouse/events/tags.py
Line 26 in 53babdb
However, a typo resulted in
EventTagEnum("foo:bar")to have"f"instead of"foo"forsubject_type.