Skip to content

Commit 2415355

Browse files
committed
Fix usages of plain "type"
Seen in python/mypy#16366 (comment)
1 parent 504ef82 commit 2415355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Error(NamedTuple):
5454
lineno: int
5555
col: int
5656
message: str
57-
type: type
57+
type: type[PyiTreeChecker]
5858

5959

6060
class TypeVarInfo(NamedTuple):
@@ -1336,7 +1336,7 @@ def _check_union_members(
13361336

13371337
def _check_for_Y051_violations(self, analysis: UnionAnalysis) -> None:
13381338
"""Search for redundant unions such as `str | Literal["foo"]`, etc."""
1339-
seen_builtins: set[type] = set()
1339+
seen_builtins: set[type[object]] = set()
13401340
for literal in analysis.combined_literal_members:
13411341
if not isinstance(literal, ast.Constant):
13421342
continue

0 commit comments

Comments
 (0)