Function | infer_old_typedDict |
Undocumented |
Function | infer_special_alias |
Infer call to tuple alias as new subscriptable class typing.Tuple. |
Function | infer_typedDict |
Replace TypedDict FunctionDef with ClassDef. |
Function | infer_typing_alias |
Infers the call to _alias function Insert ClassDef, with same name as aliased class, in mro to simulate _GenericAlias. |
Function | infer_typing_attr |
Infer a typing.X[...] subscript |
Function | infer_typing_cast |
Infer call to cast() returning same type as casted-from var |
Function | infer_typing_typevar_or_newtype |
Infer a typing.TypeVar(...) or typing.NewType(...) call |
Function | looks_like_typing_typevar_or_newtype |
Undocumented |
Constant | CLASS_GETITEM_TEMPLATE |
Undocumented |
Constant | TYPING_ALIAS |
Undocumented |
Constant | TYPING_MEMBERS |
Undocumented |
Constant | TYPING_NAMEDTUPLE_BASENAMES |
Undocumented |
Constant | TYPING_TYPE_TEMPLATE |
Undocumented |
Constant | TYPING_TYPEVARS |
Undocumented |
Constant | TYPING_TYPEVARS_QUALIFIED |
Undocumented |
Function | _forbid_class_getitem_access |
Disable the access to __class_getitem__ method for the node in parameters |
Function | _looks_like_special_alias |
Return True if call is for Tuple or Callable alias. |
Function | _looks_like_typedDict |
Check if node is TypedDict FunctionDef. |
Function | _looks_like_typing_alias |
Returns True if the node corresponds to a call to _alias function. For example : |
Function | _looks_like_typing_cast |
Undocumented |
Function | _looks_like_typing_subscript |
Try to figure out if a Subscript node might be a typing-related subscript |
Undocumented
Parameters | |
node:ClassDef | Undocumented |
ctx:typing.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Parameters | |
node:Call | Undocumented |
ctx:typing.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Parameters | |
node:FunctionDef | Undocumented |
ctx:typing.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Parameters | |
node:Call | call node |
ctx:typing.Optional[ | Undocumented |
context | inference context |
Returns | |
typing.Iterator[ | Undocumented |
Parameters | |
node:Subscript | Undocumented |
ctx:typing.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Parameters | |
node:Call | Undocumented |
ctx:typing.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Undocumented
Value |
|
Undocumented
Value |
|
Parameters | |
node:ClassDef | Undocumented |
Return True if call is for Tuple or Callable alias.
In PY37 and PY38 the call is to '_VariadicGenericAlias' with 'tuple' as first argument. In PY39+ it is replaced by a call to '_TupleType'.
PY37: Tuple = _VariadicGenericAlias(tuple, (), inst=False, special=True) PY39: Tuple = _TupleType(tuple, -1, inst=False, name='Tuple')
PY37: Callable = _VariadicGenericAlias(collections.abc.Callable, (), special=True) PY39: Callable = _CallableType(collections.abc.Callable, 2)
Parameters | |
node:Call | Undocumented |
Returns | |
bool | Undocumented |
Parameters | |
node:typing.Union[ | Undocumented |
Returns | |
bool | Undocumented |
Returns True if the node corresponds to a call to _alias function. For example :
MutableSet = _alias(collections.abc.MutableSet, T)
Parameters | |
node:Call | call node |
Returns | |
bool | Undocumented |