Representation of Python function headers and calls.
Class |
|
An abstract return type. |
Class |
|
Undocumented |
Class |
|
Represents the parameters of a function call. |
Class |
|
Undocumented |
Class |
|
A type mutation. |
Class |
|
Match a paramspec against a sig. |
Class |
|
A PyTD return type. |
Class |
|
Mixin for exceptions that hold a return node and variable. |
Class |
|
Representation of a Python function signature. |
Exception |
|
When retrieving a key that does not exist in a dict. |
Exception |
|
E.g. an arg "x" is passed to a function as both a posarg and a kwarg. |
Exception |
|
Exception for failed function calls. |
Exception |
|
Exception for functions called with an incorrect parameter combination. |
Exception |
|
E.g. a function requires parameter 'x' but 'x' isn't passed. |
Exception |
|
For objects that don't have __call__. |
Exception |
|
Function called with an undefined variable. |
Exception |
|
E.g. if a function expecting 4 parameters is called with 3. |
Exception |
|
For functions that were called with the wrong types. |
Exception |
|
E.g. an arg "x" is passed to a function that doesn't have an "x" param. |
Function | argname |
Get a name for an unnamed positional argument, given its position. |
Function | build |
Build a signature from a ParamSpecMatch and Callable args. |
Function | call |
Call a function. |
Function | get |
Gets the given function's signatures. |
Function | handle |
Returns a variable of the return value of a typeguard function. |
Function | has |
Undocumented |
Function | match |
Call match_args multiple times to find all type errors. |
Variable | log |
Undocumented |
Class | _ |
Undocumented |
Function | _convert |
Undocumented |
Function | _print |
Undocumented |
Function | _splats |
Undocumented |
Call a function. Args: ctx: The abstract context. node: The current CFG node. func_var: A variable of the possible functions to call. args: The arguments to pass. See function.Args. fallback_to_unsolvable: If the function call fails, create an unknown. allow_noreturn: Whether typing.NoReturn is allowed in the return type. strict_filter: Whether function bindings should be strictly filtered. Returns: A tuple (CFGNode, Variable). The Variable is the return value. Raises: DictKeyMissing: if we retrieved a nonexistent key from a dict and fallback_to_unsolvable is False. FailedFunctionCall: if the call fails and fallback_to_unsolvable is False.
Returns a variable of the return value of a typeguard function. Args: node: The current node. ret: The function's return value. first_arg: The first argument to the function. ctx: The current context. func_name: Optionally, the function name, for better error messages.
Call match_args multiple times to find all type errors. Args: ctx: The abstract context. node: The current CFG node. func: An abstract function args: An Args object to match against func Returns: A tuple of (new_args, errors) where new_args = args with all incorrectly typed values set to Any errors = a list of [(type mismatch error, arg name, value)] Reraises any error that is not function.InvalidParameters