class documentation
class EnumCallAnalyzer: (source)
Undocumented
Method | __init__ |
Undocumented |
Method | build |
Undocumented |
Method | check |
Check if a call defines an Enum. |
Method | fail |
Undocumented |
Method | fail |
Undocumented |
Method | parse |
Parse arguments of an Enum call. |
Method | process |
Check if s defines an Enum; if yes, store the definition in symbol table. |
Instance Variable | api |
Undocumented |
Instance Variable | options |
Undocumented |
def build_enum_call_typeinfo(self, name:
str
, items: list[ str]
, fullname: str
, line: int
) -> TypeInfo
:
(source)
¶
Undocumented
def check_enum_call(self, node:
Expression
, var_name: str
, is_func_scope: bool
) -> TypeInfo|None
:
(source)
¶
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
def fail_enum_call_arg(self, message:
str
, context: Context
) -> tuple[ list[ str], list[ Expression|None], bool]
:
(source)
¶
Undocumented
def parse_enum_call_args(self, call:
CallExpr
, class_name: str
) -> tuple[ list[ str], list[ Expression|None], bool]
:
(source)
¶
Parse arguments of an Enum call. Return a tuple of fields, values, was there an error.