module documentation

Undocumented

Class ErrorInfo Representation of a single error message.
Class Errors Container for compile errors.
Class ErrorWatcher Context manager that can be used to keep track of new errors recorded around a given operation.
Exception CompileError Exception raised when there is a compile error.
Function remove_path_prefix If path starts with prefix, return copy of path with the prefix removed. Otherwise, return path. If path is None, return None.
Function report_internal_error Report internal error and exit.
Constant allowed_duplicates Undocumented
Constant original_error_codes Undocumented
Constant SHOW_NOTE_CODES Undocumented
Type Variable T Undocumented
Type Alias ErrorTuple Undocumented
def remove_path_prefix(path: str, prefix: str|None) -> str: (source)

If path starts with prefix, return copy of path with the prefix removed. Otherwise, return path. If path is None, return None.

def report_internal_error(err: Exception, file: str|None, line: int, errors: Errors, options: Options, stdout: TextIO|None = None, stderr: TextIO|None = None) -> NoReturn: (source)

Report internal error and exit. This optionally starts pdb or shows a traceback.

allowed_duplicates: list[str] = (source)

Undocumented

Value
['@overload', 'Got:', 'Expected:']
SHOW_NOTE_CODES = (source)

Undocumented

Value
set([codes.ANNOTATION_UNCHECKED])

Undocumented

Value
TypeVar('T')
ErrorTuple: _TypeAlias = (source)

Undocumented

Value
Tuple[Optional[str], int, int, int, int, str, str, bool, Optional[ErrorCode]]