File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
classes/contrib/mypy/validation/validate_instance Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,23 @@ def check_type(
29
29
So, that's why we need this custom checker.
30
30
"""
31
31
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
+ ),
33
37
_check_all_args (instance_context .passed_args , instance_context .ctx ),
34
38
])
35
39
36
40
37
41
def _check_protocol_arg (
38
42
is_protocol : Optional [bool ],
43
+ passed_args : TupleType ,
39
44
ctx : MethodContext ,
40
45
) -> bool :
41
46
if is_protocol is None :
42
47
ctx .api .fail (
43
- _IS_PROTOCOL_LITERAL_BOOL_MSG .format (is_protocol ),
48
+ _IS_PROTOCOL_LITERAL_BOOL_MSG .format (passed_args . items [ 1 ] ),
44
49
ctx .context ,
45
50
)
46
51
return False
You can’t perform that action at this time.
0 commit comments