class EnumCallAnalyzer: (source)
Undocumented
| Method | __init__ |
Undocumented |
| Method | build_enum_call_typeinfo |
Undocumented |
| Method | check_enum_call |
Check if a call defines an Enum. |
| Method | fail |
Undocumented |
| Method | fail_enum_call_arg |
Undocumented |
| Method | parse_enum_call_args |
Parse arguments of an Enum call. |
| Method | process_enum_call |
Check if s defines an Enum; if yes, store the definition in symbol table. |
| Instance Variable | api |
Undocumented |
| Instance Variable | options |
Undocumented |
Undocumented
| Parameters | |
name:str | Undocumented |
items:List[ | Undocumented |
fullname:str | Undocumented |
line:int | Undocumented |
| Returns | |
TypeInfo | Undocumented |
Check if a call defines an Enum.
Example:
A = enum.Enum('A', 'foo bar')
is equivalent to:
- class A(enum.Enum):
- foo = 1 bar = 2
| Parameters | |
node:Expression | Undocumented |
var_name:str | Undocumented |
is_func_scope:bool | Undocumented |
| Returns | |
Optional[ | Undocumented |
Undocumented
| Parameters | |
message:str | Undocumented |
context:Context | Undocumented |
| Returns | |
Tuple[ | Undocumented |
Parse arguments of an Enum call.
Return a tuple of fields, values, was there an error.
| Parameters | |
call:CallExpr | Undocumented |
class_name:str | Undocumented |
| Returns | |
Tuple[ | Undocumented |
Check if s defines an Enum; if yes, store the definition in symbol table.
Return True if this looks like an Enum definition (but maybe with errors), otherwise return False.
| Parameters | |
s:AssignmentStmt | Undocumented |
is_func_scope:bool | Undocumented |
| Returns | |
bool | Undocumented |