Class | CollectAllInnerTypesQuery |
Undocumented |
Class | CollectAnyTypesQuery |
Undocumented |
Class | HasAnyFromUnimportedType |
Undocumented |
Class | HasExplicitAny |
Undocumented |
Class | InstanceFixer |
Undocumented |
Class | TypeAnalyser |
Semantic analyzer for types. |
Class | TypeVarLikeQuery |
Find TypeVar and ParamSpec references in an unbound type. |
Function | analyze_type_alias |
Analyze r.h.s. of a (potential) type alias definition. |
Function | check_for_explicit_any |
Undocumented |
Function | collect_all_inner_types |
Return all types that t contains |
Function | collect_any_types |
Return all inner `AnyType`s of type t |
Function | expand_type_alias |
Expand a (generic) type alias target following the rules outlined in TypeAlias docstring. |
Function | fix_instance |
Fix a malformed instance by replacing all type arguments with Any. |
Function | fix_instance_types |
Recursively fix all instance types (type argument count) in a given type. |
Function | flatten_tvars |
Undocumented |
Function | get_omitted_any |
Undocumented |
Function | has_any_from_unimported_type |
Return true if this type is Any because an import was not followed. |
Function | has_explicit_any |
Whether this type is or type it contains is an Any coming from explicit type annotation |
Function | make_optional_type |
Return the type corresponding to Optional[t]. |
Function | no_subscript_builtin_alias |
Undocumented |
Function | remove_dups |
Undocumented |
Function | set_any_tvars |
Undocumented |
Constant | ARG_KINDS_BY_CONSTRUCTOR |
Undocumented |
Constant | GENERIC_STUB_NOT_AT_RUNTIME_TYPES |
Undocumented |
Constant | T |
Undocumented |
Constant | type_constructors |
Undocumented |
Variable | MsgCallback |
Undocumented |
Variable | TypeVarLikeList |
Undocumented |
Analyze r.h.s. of a (potential) type alias definition.
If node
is valid as a type alias rvalue, return the resulting type and a set of
full names of type aliases it depends on (directly or indirectly).
Return None otherwise. 'node' must have been semantically analyzed.
Parameters | |
node:Expression | Undocumented |
api:SemanticAnalyzerCoreInterface | Undocumented |
tvar_scope:TypeVarLikeScope | Undocumented |
plugin:Plugin | Undocumented |
options:Options | Undocumented |
is_typeshed_stub:bool | Undocumented |
allow_new_syntax:bool | Undocumented |
allow_placeholder:bool | Undocumented |
in_dynamic_func:bool | Undocumented |
global_scope:bool | Undocumented |
Returns | |
Optional[ | Undocumented |
Undocumented
Parameters | |
typ:Optional[ | Undocumented |
options:Options | Undocumented |
is_typeshed_stub:bool | Undocumented |
msg:MessageBuilder | Undocumented |
context:Context | Undocumented |
Expand a (generic) type alias target following the rules outlined in TypeAlias docstring.
A = List
ctx: context where expansion happensParameters | |
node:TypeAlias | Undocumented |
args:List[ | Undocumented |
fail:MsgCallback | Undocumented |
no_args:bool | Undocumented |
ctx:Context | Undocumented |
unexpanded_type:Optional[ | Undocumented |
disallow_any:bool | Undocumented |
Returns | |
Type | Undocumented |
Fix a malformed instance by replacing all type arguments with Any.
Also emit a suitable error if this is not due to implicit Any's.
Parameters | |
t:Instance | Undocumented |
fail:MsgCallback | Undocumented |
note:MsgCallback | Undocumented |
disallow_any:bool | Undocumented |
python_version:Tuple[ | Undocumented |
use_generic_error:bool | Undocumented |
unexpanded_type:Optional[ | Undocumented |
Recursively fix all instance types (type argument count) in a given type.
For example 'Union[Dict, List[str, int]]' will be transformed into 'Union[Dict[Any, Any], List[Any]]' in place.
Parameters | |
t:Type | Undocumented |
fail:MsgCallback | Undocumented |
note:MsgCallback | Undocumented |
python_version:Tuple[ | Undocumented |
Undocumented
Parameters | |
disallow_any:bool | Undocumented |
fail:MsgCallback | Undocumented |
note:MsgCallback | Undocumented |
orig_type:Type | Undocumented |
python_version:Tuple[ | Undocumented |
fullname:Optional[ | Undocumented |
unexpanded_type:Optional[ | Undocumented |
Returns | |
AnyType | Undocumented |
Return true if this type is Any because an import was not followed.
If type t is such Any type or has type arguments that contain such Any type this function will return true.
Parameters | |
t:Type | Undocumented |
Returns | |
bool | Undocumented |
Parameters | |
t:Type | Undocumented |
Returns | |
bool | Undocumented |
Undocumented
Parameters | |
node:TypeAlias | Undocumented |
newline:int | Undocumented |
newcolumn:int | Undocumented |
from_error:bool | Undocumented |
disallow_any:bool | Undocumented |
fail:Optional[ | Undocumented |
unexpanded_type:Optional[ | Undocumented |
Returns | |
Type | Undocumented |
Undocumented
Value |
|