Skip to content

Generated file contains deprecated typing classes #1138

@EarlMilktea

Description

@EarlMilktea

I'm seeing linter errors saying that typing.Tuple and typing.Union are deprecated.

# file generated by setuptools-scm
# don't change, don't track in version control

__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]

TYPE_CHECKING = False
if TYPE_CHECKING:
    from typing import Tuple  # <- Deprecated
    from typing import Union  # <- Deprecated

    VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
    VERSION_TUPLE = object

How about replacing them with the modern alternatives? (from __future__ import annotations)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions