diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2022-02-18 15:57:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 15:57:26 +0000 |
commit | e6acd3cf4fe6910e99683c2ebe3dd917f0a3ae14 (patch) | |
tree | a65f548f8ba5e67a20149d805770166e169a0397 /stubs/sortedcontainers | |
parent | Fix bug in `StateFilter.return_expanded()` and add some tests. (#12016) (diff) | |
download | synapse-e6acd3cf4fe6910e99683c2ebe3dd917f0a3ae14.tar.xz |
Upgrade mypy to version 0.931 (#12030)
Upgrade mypy to 0.931, mypy-zope to 0.3.5 and fix new complaints.
Diffstat (limited to 'stubs/sortedcontainers')
-rw-r--r-- | stubs/sortedcontainers/sorteddict.pyi | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/stubs/sortedcontainers/sorteddict.pyi b/stubs/sortedcontainers/sorteddict.pyi index 0eaef00498..344d55cce1 100644 --- a/stubs/sortedcontainers/sorteddict.pyi +++ b/stubs/sortedcontainers/sorteddict.pyi @@ -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 |