Skip to content

Commit 3c27112

Browse files
fix mypy errs
1 parent 4aefb1b commit 3c27112

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mypyc/irbuild/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
# mypy: disable-error-code="literal-required"
12
"""Various utilities that don't depend on other modules in mypyc.irbuild."""
23

34
from __future__ import annotations
45

5-
from typing import Any, Final, FrozenSet, Literal, TypedDict
6+
from typing import Any, Final, FrozenSet, Literal, TypedDict, cast
67
from typing_extensions import NotRequired
78

89
from mypy.nodes import (
@@ -146,7 +147,7 @@ def record_unsupported_key(key: str) -> None:
146147
for name, arg in zip(d.arg_names, d.args):
147148
if name is None:
148149
if isinstance(arg, StrExpr):
149-
key = arg.value
150+
key = cast(MypycAttr, arg.value)
150151
if key in MYPYC_ATTRS:
151152
attrs[key] = True
152153
lines[key] = line

0 commit comments

Comments
 (0)