Skip to content

Commit 90f30a4

Browse files
committed
Fixes CI
1 parent b608fbd commit 90f30a4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

classes/contrib/mypy/validation/validate_instance/validate_instance_args.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,23 @@ def check_type(
2929
So, that's why we need this custom checker.
3030
"""
3131
return all([
32-
_check_protocol_arg(instance_context.is_protocol, instance_context.ctx),
32+
_check_protocol_arg(
33+
instance_context.is_protocol,
34+
instance_context.passed_args,
35+
instance_context.ctx,
36+
),
3337
_check_all_args(instance_context.passed_args, instance_context.ctx),
3438
])
3539

3640

3741
def _check_protocol_arg(
3842
is_protocol: Optional[bool],
43+
passed_args: TupleType,
3944
ctx: MethodContext,
4045
) -> bool:
4146
if is_protocol is None:
4247
ctx.api.fail(
43-
_IS_PROTOCOL_LITERAL_BOOL_MSG.format(is_protocol),
48+
_IS_PROTOCOL_LITERAL_BOOL_MSG.format(passed_args.items[1]),
4449
ctx.context,
4550
)
4651
return False

0 commit comments

Comments
 (0)