@@ -132,7 +132,7 @@ def declare(self, id_: str, lineno: int, entry: symbols.ID | symbols.TYPE) -> No
132132
133133 return entry
134134
135- def declare_safe (self , id_ : str , lineno : int , entry : symbols .ID ):
135+ def declare_safe (self , id_ : str , lineno : int , entry : symbols .ID ) -> symbols . ID | symbols . TYPE :
136136 """Like declare, but never returns None"""
137137 result = self .declare (id_ , lineno , entry )
138138 assert result is not None
@@ -204,7 +204,7 @@ def check_is_undeclared(
204204 )
205205 return False
206206
207- def check_class (self , id_ : str , class_ : CLASS , lineno : int , scope : Scope = None , show_error = True ) -> bool :
207+ def check_class (self , id_ : str , class_ : CLASS , lineno : int , scope : Scope | None = None , show_error = True ) -> bool :
208208 """Check the id is either undefined or defined with
209209 the given class.
210210
@@ -342,7 +342,7 @@ def access_id(
342342 default_class : CLASS = CLASS .unknown ,
343343 * ,
344344 ignore_explicit_flag = False ,
345- ):
345+ ) -> symbols . ID | None :
346346 """Access a symbol by its identifier and checks if it exists.
347347 If not, it's supposed to be an implicitly declared variable.
348348
@@ -442,10 +442,9 @@ def access_func(self, id_: str, lineno: int, scope=None, default_type=None):
442442
443443 return result
444444
445- def access_call (self , id_ : str , lineno : int , scope = None , type_ = None ):
445+ def access_call (self , id_ : str , lineno : int , scope = None , type_ = None ) -> symbols . ID | None :
446446 """Creates a func/array/string call. Checks if id is callable or not.
447- An identifier is "callable" if it can be followed by a list of para-
448- meters.
447+ An identifier is "callable" if it can be followed by a list of parameters.
449448 This does not mean the id_ is a function, but that it allows the same
450449 syntax a function does:
451450
0 commit comments