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:
Shantanu
2021-04-11 06:44:18 -07:00
committed by GitHub
parent b308c1f964
commit fa9d5a5e9f
36 changed files with 147 additions and 146 deletions

View File

@@ -53,15 +53,15 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
# Mypy plugin hook for 'pop' expects that 'default' has a type variable type.
def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore
def update(self: _T, __m: _T) -> None: ...
if sys.version_info < (3, 0):
if sys.version_info >= (3, 0):
def items(self) -> ItemsView[str, object]: ...
def keys(self) -> KeysView[str]: ...
def values(self) -> ValuesView[object]: ...
else:
def has_key(self, k: str) -> bool: ...
def viewitems(self) -> ItemsView[str, object]: ...
def viewkeys(self) -> KeysView[str]: ...
def viewvalues(self) -> ValuesView[object]: ...
else:
def items(self) -> ItemsView[str, object]: ...
def keys(self) -> KeysView[str]: ...
def values(self) -> ValuesView[object]: ...
def __delitem__(self, k: NoReturn) -> None: ...
# TypedDict is a (non-subscriptable) special form.