class ErrorLog(ErrorLogBase): (source)
ErrorLog with convenience functions.
Method | ambiguous |
Log an ambiguous annotation. |
Method | annotation |
Invalid combination of annotation and assignment. |
Method | any |
Logs a [bad-return-type] error. |
Method | assert |
Check that a variable type matches its expected value. |
Method | assigning |
Attempting to reassign a variable annotated with Final. |
Method | attribute |
Undocumented |
Method | bad |
Undocumented |
Method | bad |
Undocumented |
Method | bad |
Undocumented |
Method | bad |
Logs a [bad-return-type] error. |
Method | bad |
Undocumented |
Method | bad |
Undocumented |
Method | bad |
Undocumented |
Method | base |
Undocumented |
Method | container |
Invalid combination of annotation and mutation. |
Method | duplicate |
Undocumented |
Method | ignored |
Undocumented |
Method | ignored |
Undocumented |
Method | ignored |
Undocumented |
Method | import |
Undocumented |
Method | incomplete |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Log an invalid function call. |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | invalid |
Undocumented |
Method | late |
Undocumented |
Method | match |
Undocumented |
Method | missing |
A function call is missing parameters. |
Method | mro |
Undocumented |
Method | name |
Undocumented |
Method | not |
Calling an object that isn't callable. |
Method | not |
Undocumented |
Method | not |
Instantiating an abstract class. |
Method | not |
Undocumented |
Method | not |
Undocumented |
Method | overriding |
Undocumented |
Method | overriding |
Undocumented |
Method | overriding |
Signature mismatch between overridden and overriding class methods. |
Method | paramspec |
Undocumented |
Method | pyi |
Undocumented |
Method | python |
Undocumented |
Method | recursion |
Undocumented |
Method | redundant |
Undocumented |
Method | redundant |
Undocumented |
Method | reveal |
Undocumented |
Method | subclassing |
Undocumented |
Method | typed |
Accessing a nonexistent key in a typed dict. |
Method | unbound |
Undocumented |
Method | unsupported |
Undocumented |
Method | wrong |
Log an error for an annotation with the wrong number of parameters. |
Method | wrong |
Undocumented |
Method | wrong |
Log [wrong-arg-types]. |
Method | wrong |
A function was called with extra keywords. |
Method | _attribute |
Log an attribute error. |
Method | _get |
Return (op, left, right) if the function should be treated as a binop. |
Method | _invalid |
Log the invalid annotation. |
Method | _invalid |
Log an invalid parameters error. |
Method | _iter |
Yield the prefix, name and type information for actual parameters. |
Method | _iter |
Yield the prefix, name and type information for expected parameters. |
Method | _iter |
Iterate through a function.Signature object. Focus on a bad parameter. |
Method | _join |
Pretty-print the union of the printed types. |
Method | _module |
Undocumented |
Method | _normalize |
If applicable, converts from `f(self: A, ...)` to `A.f(self, ...)`. |
Method | _overriding |
Undocumented |
Method | _prepare |
Prepare printable annotation matching errors. |
Method | _print |
Pretty-print a list of arguments. Focus on a bad parameter. |
Method | _print |
Undocumented |
Method | _print |
Print abstract value t as a pytd type. |
Method | _print |
Undocumented |
Method | _print |
Undocumented |
Method | _print |
Print the actual and expected values for a return type. |
Method | _print |
Undocumented |
Method | _print |
Pretty-print the matcher.NonIterableStrError instance. |
Method | _print |
Undocumented |
Method | _print |
Pretty-print the protocol error. |
Method | _print |
Pretty-print the matcher.TypedDictError instance. |
Method | _pytd |
Print the name of the pytd type. |
Method | _show |
Show variable as 'name: typ' or 'pyval: typ' if available. |
Method | _unsupported |
Unsupported operands. |
Method | _wrong |
A function was called with the wrong parameter types. |
Inherited from ErrorLogBase
:
Method | __getitem__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | checkpoint |
Record errors without adding them to the errorlog. |
Method | copy |
Undocumented |
Method | error |
Undocumented |
Method | has |
Return true iff an Error with SEVERITY_ERROR is present. |
Method | is |
Return True iff name was defined in an @error_name() decorator. |
Method | print |
Print the errorlog to a csv file. |
Method | print |
Undocumented |
Method | print |
Undocumented |
Method | set |
Set the error filter. |
Method | unique |
Gets the unique errors in this log, sorted on filename and lineno. |
Method | warn |
Undocumented |
Method | _add |
Undocumented |
Method | _sorted |
Undocumented |
Instance Variable | _errors |
Undocumented |
Instance Variable | _filter |
Undocumented |
Optional[ Union[ str, Iterable[ abstract.BaseValue]]]
, name=None):
(source)
¶
Log an ambiguous annotation.
def annotation_type_mismatch(self, stack, annot, binding, name, error_details, details=None, *, typed_dict=None): (source) ¶
Invalid combination of annotation and assignment.
def bad_concrete_type(self, stack, node, bad, details=None): (source) ¶
Undocumented
def bad_yield_annotation(self, stack, name, annot, is_async): (source) ¶
Undocumented
def base_class_error(self, stack, base_var, details=None): (source) ¶
Undocumented
def container_type_mismatch(self, stack, obj, mutations, name): (source) ¶
Invalid combination of annotation and mutation. Args: stack: the frame stack obj: the container instance being mutated mutations: a dict of {parameter name: (annotated types, new types)} name: the variable name (or None)
def duplicate_keyword(self, stack, name, bad_call, duplicate): (source) ¶
Undocumented
def ignored_abstractmethod(self, stack, cls_name, method_name): (source) ¶
Undocumented
def ignored_type_comment(self, filename, lineno, comment): (source) ¶
Undocumented
def incomplete_match(self, stack, line, cases, details=None): (source) ¶
Undocumented
Optional[ Union[ str, abstract.BaseValue]]
, details=None, name=None):
(source)
¶
Undocumented
def invalid_directive(self, filename, lineno, message): (source) ¶
Undocumented
def invalid_function_definition(self, stack, msg, details=None): (source) ¶
Undocumented
def invalid_function_type_comment(self, stack, comment, details=None): (source) ¶
Undocumented
def invalid_namedtuple_arg(self, stack, badname=None, err_msg=None): (source) ¶
Undocumented
def invalid_signature_mutation(self, stack, func_name, sig): (source) ¶
Undocumented
def invalid_super_call(self, stack, message, details=None): (source) ¶
Undocumented
def invalid_typevar(self, stack, comment, bad_call=None): (source) ¶
Undocumented
def match_posargs_count(self, stack, cls, posargs, match_args, details=None): (source) ¶
Undocumented
def missing_parameter(self, stack, name, bad_call, missing_parameter): (source) ¶
A function call is missing parameters.
def not_indexable(self, stack, name, generic_warning=False): (source) ¶
Undocumented
def not_supported_yet(self, stack, feature, details=None): (source) ¶
Undocumented
def overriding_signature_mismatch(self, stack, base_signature, class_signature, details=None): (source) ¶
Signature mismatch between overridden and overriding class methods.
def python_compiler_error(self, filename, lineno, message): (source) ¶
Undocumented
def redundant_function_type_comment(self, filename, lineno): (source) ¶
Undocumented
def subclassing_final_class(self, stack, base_var, details=None): (source) ¶
Undocumented
Accessing a nonexistent key in a typed dict. Args: stack: the frame stack obj: the typed dict instance name: the key name
def unbound_type_param(self, stack, obj, attr_name, type_param_name): (source) ¶
Undocumented
abstract.BaseValue
, params: Sequence[ abstract.BaseValue]
, expected_count: int
, template: Optional[ Iterable[ str]]
= None):
(source)
¶
Log an error for an annotation with the wrong number of parameters.
def wrong_keyword_args(self, stack, name, bad_call, extra_keywords): (source) ¶
A function was called with extra keywords.
def _invalid_annotation(self, stack, annot_string, details, name): (source) ¶
Log the invalid annotation.
def _overriding_final(self, stack, cls, base, name, *, is_method, details): (source) ¶
Undocumented
def _unsupported_operands(self, stack, operator, *operands, details=None): (source) ¶
Unsupported operands.