Skip to content

Commit 195ab98

Browse files
authored
Save work on emitting ignored diagnostics pt 2 (#20696)
This should be another 2.5% on self check Sequel to #20621
1 parent 0709173 commit 195ab98

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4754,7 +4754,7 @@ def check_simple_assignment(
47544754
self.msg.deleted_as_rvalue(rvalue_type, context)
47554755
if isinstance(lvalue_type, DeletedType):
47564756
self.msg.deleted_as_lvalue(lvalue_type, context)
4757-
elif lvalue_type:
4757+
elif lvalue_type and not self.can_skip_diagnostics:
47584758
self.check_subtype(
47594759
# Preserve original aliases for error messages when possible.
47604760
rvalue_type,

mypy/checkexpr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,8 @@ def check_argument_types(
25262526
25272527
The check_call docstring describes some of the arguments.
25282528
"""
2529+
if self.chk.can_skip_diagnostics:
2530+
return
25292531
self.check_var_args_kwargs(arg_types, arg_kinds, context)
25302532

25312533
check_arg = check_arg or self.check_arg

0 commit comments

Comments
 (0)