mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Improve the first overload of is_dataclass (#9758)
This commit is contained in:
@@ -223,7 +223,7 @@ else:
|
||||
|
||||
def fields(class_or_instance: DataclassInstance | type[DataclassInstance]) -> tuple[Field[Any], ...]: ...
|
||||
@overload
|
||||
def is_dataclass(obj: DataclassInstance | type[DataclassInstance]) -> Literal[True]: ...
|
||||
def is_dataclass(obj: DataclassInstance) -> Literal[True]: ...
|
||||
@overload
|
||||
def is_dataclass(obj: type) -> TypeGuard[type[DataclassInstance]]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user