mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-21 18:42:07 +08:00
Eliminated the use of "bare" TypeVars in stdlib stubs (#5041)
Eliminated the use of "bare" TypeVars (i.e. a TypeVar that appears only once) within generic methods. While not considered an error in PEP 484, these are a common source of bugs in code, and some type checkers (including pytype and pyright) flag them as errors. Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
@@ -86,17 +86,17 @@ def contains(__a: Container[Any], __b: Any) -> bool: ...
|
||||
def __contains__(a: Container[Any], b: Any) -> bool: ...
|
||||
def countOf(__a: Container[Any], __b: Any) -> int: ...
|
||||
@overload
|
||||
def delitem(__a: MutableSequence[_T], __b: int) -> None: ...
|
||||
def delitem(__a: MutableSequence[Any], __b: int) -> None: ...
|
||||
@overload
|
||||
def delitem(__a: MutableSequence[_T], __b: slice) -> None: ...
|
||||
def delitem(__a: MutableSequence[Any], __b: slice) -> None: ...
|
||||
@overload
|
||||
def delitem(__a: MutableMapping[_K, _V], __b: _K) -> None: ...
|
||||
def delitem(__a: MutableMapping[_K, Any], __b: _K) -> None: ...
|
||||
@overload
|
||||
def __delitem__(a: MutableSequence[_T], b: int) -> None: ...
|
||||
def __delitem__(a: MutableSequence[Any], b: int) -> None: ...
|
||||
@overload
|
||||
def __delitem__(a: MutableSequence[_T], b: slice) -> None: ...
|
||||
def __delitem__(a: MutableSequence[Any], b: slice) -> None: ...
|
||||
@overload
|
||||
def __delitem__(a: MutableMapping[_K, _V], b: _K) -> None: ...
|
||||
def __delitem__(a: MutableMapping[_K, Any], b: _K) -> None: ...
|
||||
|
||||
if sys.version_info < (3,):
|
||||
def delslice(a: MutableSequence[Any], b: int, c: int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user