Skip to content

Commit fff29df

Browse files
committed
Add some type annotations
1 parent 11a1e75 commit fff29df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mypyc/irbuild/mapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def fdef_to_sig(self, fdef: FuncDef, strict_dunders_typing: bool) -> FuncSignatu
178178
# Give a more precise type for generators, so that we can optimize
179179
# code that uses them. They return a generator object, which has a
180180
# specific class. Without this, the type would have to be 'object'.
181-
ret = RInstance(self.fdef_to_generator[fdef])
181+
ret: RType = RInstance(self.fdef_to_generator[fdef])
182182
else:
183183
ret = self.type_to_rtype(fdef.type.ret_type)
184184
else:

mypyc/irbuild/statement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ def emit_yield_from_or_await(
939939
and val.type.class_ir.has_method(helper_method)
940940
):
941941
# This is a generated generator class, and we can use a fast path.
942-
iter_val = val
942+
iter_val: Value = val
943943
else:
944944
get_op = coro_op if is_await else iter_op
945945
if isinstance(get_op, PrimitiveDescription):

0 commit comments

Comments
 (0)