class CallableType(FunctionLike): (source)
Type of a non-overloaded callable object (such as function).
Class Method | deserialize |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | accept |
Undocumented |
Method | argument |
Undocumented |
Method | argument |
Undocumented |
Method | copy |
Undocumented |
Method | expand |
Undocumented |
Method | formal |
Return a list of the formal arguments of this callable, ignoring *arg and **kwargs. |
Method | get |
Undocumented |
Method | is |
Undocumented |
Method | is |
Undocumented |
Method | kw |
The formal argument for **kwargs. |
Method | max |
Returns maximum number of positional arguments this method could possibly accept. |
Method | param |
Return ParamSpec if callable can be called with one. |
Method | serialize |
Undocumented |
Method | try |
Undocumented |
Method | try |
Undocumented |
Method | type |
Undocumented |
Method | type |
Undocumented |
Method | var |
The formal argument for *args. |
Method | with |
Return a copy of this type with the specified name. |
Method | with |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | arg |
Undocumented |
Instance Variable | arg |
Undocumented |
Instance Variable | arg |
Undocumented |
Instance Variable | bound |
Undocumented |
Instance Variable | def |
Undocumented |
Instance Variable | definition |
Undocumented |
Instance Variable | fallback |
Undocumented |
Instance Variable | from |
Undocumented |
Instance Variable | from |
Undocumented |
Instance Variable | implicit |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | min |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | ret |
Undocumented |
Instance Variable | special |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | unpack |
Undocumented |
Instance Variable | variables |
Undocumented |
Property | is |
Does this callable have a **kwargs argument? |
Property | is |
Does this callable have a *args argument? |
Property | items |
Undocumented |
Inherited from FunctionLike
:
Instance Variable | _can |
Undocumented |
Inherited from Type
(via FunctionLike
, ProperType
):
Method | __repr__ |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | is |
Undocumented |
Property | can |
Undocumented |
Property | can |
Undocumented |
Instance Variable | _can |
Undocumented |
Inherited from Context
(via FunctionLike
, ProperType
, Type
):
Method | set |
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 |
Undocumented |
Instance Variable | end |
Undocumented |
Instance Variable | line |
Undocumented |
Sequence[ Type]
, arg_kinds: list[ ArgKind]
, arg_names: Sequence[ str|None]
, ret_type: Type
, fallback: Instance
, name: str|None
= None, definition: SymbolNode|None
= None, variables: Sequence[ TypeVarLikeType]|None
= None, line: int
= -1, column: int
= -1, is_ellipsis_args: bool
= False, implicit: bool
= False, special_sig: str|None
= None, from_type_type: bool
= False, bound_args: Sequence[ Type|None]
= (), def_extras: dict[ str, Any]|None
= None, type_guard: Type|None
= None, from_concatenate: bool
= False, unpack_kwargs: bool
= False):
(source)
¶
mypy.types.FunctionLike.__init__
Undocumented
CT
, arg_types: Bogus[ Sequence[ Type]]
= _dummy, arg_kinds: Bogus[ list[ ArgKind]]
= _dummy, arg_names: Bogus[ list[ str|None]]
= _dummy, ret_type: Bogus[ Type]
= _dummy, fallback: Bogus[ Instance]
= _dummy, name: Bogus[ str|None]
= _dummy, definition: Bogus[ SymbolNode]
= _dummy, variables: Bogus[ Sequence[ TypeVarLikeType]]
= _dummy, line: int
= _dummy_int, column: int
= _dummy_int, is_ellipsis_args: Bogus[ bool]
= _dummy, implicit: Bogus[ bool]
= _dummy, special_sig: Bogus[ str|None]
= _dummy, from_type_type: Bogus[ bool]
= _dummy, bound_args: Bogus[ list[ Type|None]]
= _dummy, def_extras: Bogus[ dict[ str, Any]]
= _dummy, type_guard: Bogus[ Type|None]
= _dummy, from_concatenate: Bogus[ bool]
= _dummy, unpack_kwargs: Bogus[ bool]
= _dummy) -> CT
:
(source)
¶
Undocumented
CallableType|Parameters
, no_prefix: bool
= False) -> CallableType
:
(source)
¶
Undocumented
Return a list of the formal arguments of 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'.
Returns maximum number of positional arguments this method could possibly accept. This takes into account *arg and **kwargs but excludes keyword-only args.
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.