@@ -165,7 +165,7 @@ def enable_errors(self) -> None:
165
165
def is_errors (self ) -> bool :
166
166
return self .errors .is_errors ()
167
167
168
- def report (self , msg : str , context : Context , severity : str ,
168
+ def report (self , msg : str , context : Optional [ Context ] , severity : str ,
169
169
file : Optional [str ] = None , origin : Optional [Context ] = None ,
170
170
offset : int = 0 ) -> None :
171
171
"""Report an error or note (unless disabled)."""
@@ -175,7 +175,7 @@ def report(self, msg: str, context: Context, severity: str,
175
175
msg .strip (), severity = severity , file = file , offset = offset ,
176
176
origin_line = origin .get_line () if origin else None )
177
177
178
- def fail (self , msg : str , context : Context , file : Optional [str ] = None ,
178
+ def fail (self , msg : str , context : Optional [ Context ] , file : Optional [str ] = None ,
179
179
origin : Optional [Context ] = None ) -> None :
180
180
"""Report an error message (unless disabled)."""
181
181
self .report (msg , context , 'error' , file = file , origin = origin )
@@ -641,7 +641,7 @@ def invalid_index_type(self, index_type: Type, expected_type: Type, base_str: st
641
641
self .format (index_type ), base_str , self .format (expected_type )), context )
642
642
643
643
def too_few_arguments (self , callee : CallableType , context : Context ,
644
- argument_names : List [ str ]) -> None :
644
+ argument_names : Optional [ Sequence [ Optional [ str ]] ]) -> None :
645
645
if (argument_names is not None and not all (k is None for k in argument_names )
646
646
and len (argument_names ) >= 1 ):
647
647
diff = [k for k in callee .arg_names if k not in argument_names ]
@@ -695,7 +695,7 @@ def duplicate_argument_value(self, callee: CallableType, index: int,
695
695
format (capitalize (callable_name (callee )),
696
696
callee .arg_names [index ]), context )
697
697
698
- def does_not_return_value (self , callee_type : Type , context : Context ) -> None :
698
+ def does_not_return_value (self , callee_type : Optional [ Type ] , context : Context ) -> None :
699
699
"""Report an error about use of an unusable type."""
700
700
name = None # type: Optional[str]
701
701
if isinstance (callee_type , FunctionLike ):
0 commit comments