Skip to content

Commit 2348b8d

Browse files
authored
Improve inference in tuple multiplication plugin (#18521)
Simple typo that I noticed
1 parent 4a76a1a commit 2348b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/plugins/default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def tuple_mul_callback(ctx: MethodContext) -> Type:
554554
value = arg_type.last_known_value.value
555555
if isinstance(value, int):
556556
return ctx.type.copy_modified(items=ctx.type.items * value)
557-
elif isinstance(ctx.type, LiteralType):
557+
elif isinstance(arg_type, LiteralType):
558558
value = arg_type.value
559559
if isinstance(value, int):
560560
return ctx.type.copy_modified(items=ctx.type.items * value)

0 commit comments

Comments
 (0)