mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 19:14:50 -04:00
Upgrade mypy to version 0.931 (#12030)
Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
This commit is contained in:
parent
eb609c65d0
commit
e6acd3cf4f
9 changed files with 33 additions and 19 deletions
|
@ -66,13 +66,18 @@ class SortedDict(Dict[_KT, _VT]):
|
|||
def __copy__(self: _SD) -> _SD: ...
|
||||
@classmethod
|
||||
@overload
|
||||
def fromkeys(cls, seq: Iterable[_T_h]) -> SortedDict[_T_h, None]: ...
|
||||
def fromkeys(
|
||||
cls, seq: Iterable[_T_h], value: None = ...
|
||||
) -> SortedDict[_T_h, None]: ...
|
||||
@classmethod
|
||||
@overload
|
||||
def fromkeys(cls, seq: Iterable[_T_h], value: _S) -> SortedDict[_T_h, _S]: ...
|
||||
def keys(self) -> SortedKeysView[_KT]: ...
|
||||
def items(self) -> SortedItemsView[_KT, _VT]: ...
|
||||
def values(self) -> SortedValuesView[_VT]: ...
|
||||
# As of Python 3.10, `dict_{keys,items,values}` have an extra `mapping` attribute and so
|
||||
# `Sorted{Keys,Items,Values}View` are no longer compatible with them.
|
||||
# See https://github.com/python/typeshed/issues/6837
|
||||
def keys(self) -> SortedKeysView[_KT]: ... # type: ignore[override]
|
||||
def items(self) -> SortedItemsView[_KT, _VT]: ... # type: ignore[override]
|
||||
def values(self) -> SortedValuesView[_VT]: ... # type: ignore[override]
|
||||
@overload
|
||||
def pop(self, key: _KT) -> _VT: ...
|
||||
@overload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue