class CallableType(FunctionLike): (source)
| Class Method | deserialize |
Undocumented |
| Method | __eq__ |
Undocumented |
| Method | __hash__ |
Undocumented |
| Method | __init__ |
Undocumented |
| Method | accept |
Undocumented |
| Method | argument_by_name |
Undocumented |
| Method | argument_by_position |
Undocumented |
| Method | copy_modified |
Undocumented |
| Method | expand_param_spec |
Undocumented |
| Method | formal_arguments |
Yields the formal arguments corresponding to this callable, ignoring *arg and **kwargs. |
| Method | get_name |
Undocumented |
| Method | is_generic |
Undocumented |
| Method | is_type_obj |
Undocumented |
| Method | kw_arg |
The formal argument for **kwargs. |
| Method | max_possible_positional_args |
Returns maximum number of positional arguments this method could possibly accept. |
| Method | param_spec |
Return ParamSpec if callable can be called with one. |
| Method | serialize |
Undocumented |
| Method | try_synthesizing_arg_from_kwarg |
Undocumented |
| Method | try_synthesizing_arg_from_vararg |
Undocumented |
| Method | type_object |
Undocumented |
| Method | type_var_ids |
Undocumented |
| Method | var_arg |
The formal argument for *args. |
| Method | with_name |
Return a copy of this type with the specified name. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | arg_kinds |
Undocumented |
| Instance Variable | arg_names |
Undocumented |
| Instance Variable | arg_types |
Undocumented |
| Instance Variable | bound_args |
Undocumented |
| Instance Variable | def_extras |
Undocumented |
| Instance Variable | definition |
Undocumented |
| Instance Variable | fallback |
Undocumented |
| Instance Variable | from_type_type |
Undocumented |
| Instance Variable | implicit |
Undocumented |
| Instance Variable | is_ellipsis_args |
Undocumented |
| Instance Variable | min_args |
Undocumented |
| Instance Variable | name |
Undocumented |
| Instance Variable | ret_type |
Undocumented |
| Instance Variable | special_sig |
Undocumented |
| Instance Variable | type_guard |
Undocumented |
| Instance Variable | variables |
Undocumented |
| Property | is_kw_arg |
Does this callable have a **kwargs argument? |
| Property | is_var_arg |
Does this callable have a *args argument? |
| Property | items |
Undocumented |
Inherited from FunctionLike:
| Instance Variable | can_be_false |
Undocumented |
Inherited from Type (via FunctionLike, ProperType):
| Method | __repr__ |
Undocumented |
| Method | can_be_false_default |
Undocumented |
| Method | can_be_true_default |
Undocumented |
| Instance Variable | can_be_true |
Undocumented |
Inherited from Context (via FunctionLike, ProperType, Type):
| Method | get_column |
Don't use. Use x.column. |
| Method | get_line |
Don't use. Use x.line. |
| Method | set_line |
If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node. |
| Instance Variable | column |
Undocumented |
| Instance Variable | end_line |
Undocumented |
| Instance Variable | line |
Undocumented |
mypy.types.Type.deserializeUndocumented
| Parameters | |
data:JsonDict | Undocumented |
| Returns | |
CallableType | Undocumented |
mypy.types.FunctionLike.__init__Undocumented
| Parameters | |
arg_types:Sequence[ | Undocumented |
arg_kinds:List[ | Undocumented |
arg_names:Sequence[ | Undocumented |
ret_type:Type | Undocumented |
fallback:Instance | Undocumented |
name:Optional[ | Undocumented |
definition:Optional[ | Undocumented |
variables:Optional[ | Undocumented |
line:int | Undocumented |
column:int | Undocumented |
is_ellipsis_args:bool | Undocumented |
implicit:bool | Undocumented |
special_sig:Optional[ | Undocumented |
from_type_type:bool | Undocumented |
bound_args:Sequence[ | Undocumented |
def_extras:Optional[ | Undocumented |
type_guard:Optional[ | Undocumented |
mypy.types.Type.acceptUndocumented
| Parameters | |
visitor:TypeVisitor[ | Undocumented |
| Returns | |
T | Undocumented |
Undocumented
| Parameters | |
arg_types:Bogus[ | Undocumented |
arg_kinds:Bogus[ | Undocumented |
arg_names:Bogus[ | Undocumented |
ret_type:Bogus[ | Undocumented |
fallback:Bogus[ | Undocumented |
name:Bogus[ | Undocumented |
definition:Bogus[ | Undocumented |
variables:Bogus[ | Undocumented |
line:Bogus[ | Undocumented |
column:Bogus[ | Undocumented |
is_ellipsis_args:Bogus[ | Undocumented |
implicit:Bogus[ | Undocumented |
special_sig:Bogus[ | Undocumented |
from_type_type:Bogus[ | Undocumented |
bound_args:Bogus[ | Undocumented |
def_extras:Bogus[ | Undocumented |
type_guard:Bogus[ | Undocumented |
| Returns | |
CallableType | Undocumented |
Yields the formal arguments corresponding to this callable, ignoring *arg and **kwargs.
To handle *args and **kwargs, use the 'callable.var_args' and 'callable.kw_args' fields, if they are not None.
If you really want to include star args in the yielded output, set the 'include_star_args' parameter to 'True'.
| Parameters | |
include_star_args:bool | Undocumented |
| Returns | |
List[ | Undocumented |
Return ParamSpec if callable can be called with one.
A Callable accepting ParamSpec P args (*args, **kwargs) must have the two final parameters like this: *args: P.args, **kwargs: P.kwargs.
| Returns | |
Optional[ | Undocumented |
mypy.types.FunctionLike.with_name| Parameters | |
name:str | Undocumented |
| Returns | |
CallableType | Undocumented |