Skip to content

Use set instead of list for dag's tags #41420

Description

@Avihais12344

Description

Instead of using list for holding the tags of a specific dag (as we can see at the docs), I suggest using set instead, specifically MutableSet for the type hinting, and python set 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?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corekind:featureFeature Requestsneeds-triagelabel for new issues that we didn't triage yetpending-responsestaleStale PRs per the .github/workflows/stale.yml policy file

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions