Merged
Conversation
| for definition in definitions | ||
| } | ||
| self._tags_mapping: Dict[Tag, List[str]] = {} | ||
| self._tags_mapping: Dict[Tag, Set[str]] = {} |
Contributor
There was a problem hiding this comment.
If we are modifying this, I think that we can also use the built-in types (dict instead of Dict, set instead of Set) to avoid adding an unneeded dependency. WDYT?
Contributor
Author
There was a problem hiding this comment.
I'd love this, however the package still targets python 3.8, and it does not have the built-in types 😢
Contributor
There was a problem hiding this comment.
Tiny clarification: Built-in types are supported (like set), but they're not subscriptable (like set[str]).
Anyway, as you say, we can't use it here 🙁 we will drop support for 3.8 soon™ 🔥
andrsdt
approved these changes
Jun 4, 2025
Contributor
andrsdt
left a comment
There was a problem hiding this comment.
LGTM ✅
Great job guys! 🔝🥇
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


BDE-2483
This PR is part of a series
💡 Context
While reviewing the library to do a talk about pypendency I have found some possible issues.
There is currently a warning in this line:

The issue is that we type

_tags_mappingas adict[tag, list(str)]hereso there is a mismatch with the defined type and the actual value
typing the
_tags_mappingwith the proper type solves the warning.📖 Summary
This PR changes the type definition of
_tags_mappingtodict[tag, set(str)]🧪 How should this be manually tested?
You can manually run the tests with: