mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +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:
@@ -1200,9 +1200,9 @@ def reversed(__sequence: Sequence[_T]) -> Iterator[_T]: ...
|
||||
def reversed(__sequence: Reversible[_T]) -> Iterator[_T]: ...
|
||||
def repr(__obj: object) -> str: ...
|
||||
@overload
|
||||
def round(number: SupportsRound[_T]) -> int: ...
|
||||
def round(number: SupportsRound[Any]) -> int: ...
|
||||
@overload
|
||||
def round(number: SupportsRound[_T], ndigits: None) -> int: ...
|
||||
def round(number: SupportsRound[Any], ndigits: None) -> int: ...
|
||||
@overload
|
||||
def round(number: SupportsRound[_T], ndigits: int) -> _T: ...
|
||||
def setattr(__obj: Any, __name: str, __value: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user