-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dataclasses.replace: fall through to typeshed sig
- Loading branch information
Showing
4 changed files
with
42 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
from typing import Protocol, TypeVar, Iterable | ||
from dataclasses import Field | ||
from typing import Any, ClassVar, Protocol, TypeVar, Iterable | ||
|
||
_KT = TypeVar("_KT") | ||
_VT_co = TypeVar("_VT_co", covariant=True) | ||
|
||
class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]): | ||
def keys(self) -> Iterable[_KT]: pass | ||
def __getitem__(self, __key: _KT) -> _VT_co: pass | ||
|
||
class DataclassInstance(Protocol): | ||
__dataclass_fields__: ClassVar[dict[str, Field[Any]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters