mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in https://github.com/python/typeshed/pull/5205
This commit is contained in:
@@ -59,18 +59,18 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __str__(self) -> str: ...
|
||||
def copy(self) -> WeakValueDictionary[_KT, _VT]: ...
|
||||
if sys.version_info < (3, 0):
|
||||
if sys.version_info >= (3, 0):
|
||||
# These are incompatible with Mapping
|
||||
def keys(self) -> Iterator[_KT]: ... # type: ignore
|
||||
def values(self) -> Iterator[_VT]: ... # type: ignore
|
||||
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
|
||||
else:
|
||||
def keys(self) -> List[_KT]: ...
|
||||
def values(self) -> List[_VT]: ...
|
||||
def items(self) -> List[Tuple[_KT, _VT]]: ...
|
||||
def iterkeys(self) -> Iterator[_KT]: ...
|
||||
def itervalues(self) -> Iterator[_VT]: ...
|
||||
def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ...
|
||||
else:
|
||||
# These are incompatible with Mapping
|
||||
def keys(self) -> Iterator[_KT]: ... # type: ignore
|
||||
def values(self) -> Iterator[_VT]: ... # type: ignore
|
||||
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
|
||||
def itervaluerefs(self) -> Iterator[KeyedRef[_KT, _VT]]: ...
|
||||
def valuerefs(self) -> List[KeyedRef[_KT, _VT]]: ...
|
||||
|
||||
@@ -95,7 +95,12 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __str__(self) -> str: ...
|
||||
def copy(self) -> WeakKeyDictionary[_KT, _VT]: ...
|
||||
if sys.version_info < (3, 0):
|
||||
if sys.version_info >= (3, 0):
|
||||
# These are incompatible with Mapping
|
||||
def keys(self) -> Iterator[_KT]: ... # type: ignore
|
||||
def values(self) -> Iterator[_VT]: ... # type: ignore
|
||||
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
|
||||
else:
|
||||
def keys(self) -> List[_KT]: ...
|
||||
def values(self) -> List[_VT]: ...
|
||||
def items(self) -> List[Tuple[_KT, _VT]]: ...
|
||||
@@ -103,11 +108,6 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
|
||||
def itervalues(self) -> Iterator[_VT]: ...
|
||||
def iteritems(self) -> Iterator[Tuple[_KT, _VT]]: ...
|
||||
def iterkeyrefs(self) -> Iterator[ref[_KT]]: ...
|
||||
else:
|
||||
# These are incompatible with Mapping
|
||||
def keys(self) -> Iterator[_KT]: ... # type: ignore
|
||||
def values(self) -> Iterator[_VT]: ... # type: ignore
|
||||
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
|
||||
def keyrefs(self) -> List[ref[_KT]]: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
|
||||
Reference in New Issue
Block a user