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:
Eric Traut
2021-02-27 20:43:45 -07:00
committed by GitHub
parent 3c0f2acdf0
commit e2967a8bee
16 changed files with 34 additions and 37 deletions

View File

@@ -52,7 +52,7 @@ def translation(
domain: str,
localedir: Optional[StrPath] = ...,
languages: Optional[Iterable[str]] = ...,
class_: Type[_T] = ...,
class_: Type[Any] = ...,
fallback: Literal[True] = ...,
codeset: Optional[str] = ...,
) -> Any: ...