-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed as not planned
Closed as not planned
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
This was introduced by BPO45663.
>>> import typing
... import dataclasses
...
... T = typing.TypeVar("T")
...
... @dataclasses.dataclass
... class A(typing.Generic[T]):
... x: T
...
>>> dataclasses.is_dataclass(A)
True
>>> dataclasses.is_dataclass(A[float])
False
>>> dataclasses.is_dataclass(A(0))
True
>>> dataclasses.is_dataclass(A[float](0))
True
That second dataclasses.is_dataclass
call should be True
Bug reproduced on cpython 3.9.12 x86_64-linux-gnu
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error