From 2415355a45c856919926431f453e2fca890e846d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 21 Nov 2023 06:11:22 -0800 Subject: [PATCH] Fix usages of plain "type" Seen in https://github.com/python/mypy/pull/16366#issuecomment-1820349175 --- pyi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyi.py b/pyi.py index 971bde3d..babf843c 100644 --- a/pyi.py +++ b/pyi.py @@ -54,7 +54,7 @@ class Error(NamedTuple): lineno: int col: int message: str - type: type + type: type[PyiTreeChecker] class TypeVarInfo(NamedTuple): @@ -1336,7 +1336,7 @@ def _check_union_members( def _check_for_Y051_violations(self, analysis: UnionAnalysis) -> None: """Search for redundant unions such as `str | Literal["foo"]`, etc.""" - seen_builtins: set[type] = set() + seen_builtins: set[type[object]] = set() for literal in analysis.combined_literal_members: if not isinstance(literal, ast.Constant): continue