Skip to content

Commit f7468d9

Browse files
fix mypy err
1 parent 9d12459 commit f7468d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/irbuild/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, Final, Literal, TypedDict
5+
from typing import Any, Final, Literal, TypedDict, cast
66
from typing_extensions import NotRequired
77

88
from mypy.nodes import (
@@ -138,6 +138,7 @@ def get_mypyc_attrs(
138138

139139
def set_mypyc_attr(key: str, value: Any, line: int) -> None:
140140
if key in MYPYC_ATTRS:
141+
key = cast(MypycAttr, key)
141142
attrs[key] = value
142143
lines[key] = line
143144
else:

0 commit comments

Comments
 (0)