-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Use set
instead of list
for dag's tags
#41420
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
@Avihais12344 Thanks for raising the issue. I had follow-up questions:
|
Hello @sunank200, thanks for responding. It would break existing code expecting tags as list, that's why I wanted to discuss it here. We can ensure the use of |
Created a PR for this here. |
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
This issue has been closed because it has not received response from the issue author. |
Description
Instead of using
list
for holding the tags of a specific dag (as we can see at the docs), I suggest usingset
instead, specificallyMutableSet
for the type hinting, and pythonset
as the default implementation.Use case/motivation
I would want to add multiple tags (even the same ones) faster, without worrying about duplicates, and reduce the memory usage because of it. Also, it's good to check if a certain tag already exists.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: