Skip to content

reprexlite.exceptions

Classes

BlackNotFoundError

Bases: ModuleNotFoundError, ReprexliteException

Raised when ipython cannot be found when using a black-dependent feature.

EditorError

Bases: ReprexliteException

Raised when an error occurs with the editor.

IPythonNotFoundError

Bases: ModuleNotFoundError, ReprexliteException

Raised when ipython cannot be found when using an IPython-dependent feature.

InputSyntaxError

Bases: SyntaxError, ReprexliteException

Raised when encountering a syntax error when parsing input.

PygmentsNotFoundError

Bases: ModuleNotFoundError, ReprexliteException

Raised when pygments cannot be found when using a pygments-dependent feature.

ReprexliteException

Bases: Exception

Base class for reprexlite exceptions.

UnexpectedError

UnexpectedError(msg: str, *args: object)

Bases: ReprexliteException

Raised when an unexpected case happens.

Source code in reprexlite/exceptions.py
52
53
54
55
56
57
58
59
def __init__(self, msg: str, *args: object):
    if not msg.endswith(" "):
        msg += " "
    msg += (
        "If you see this error from normal usage, please report at "
        "https://github.com/jayqi/reprexlite/issues"
    )
    super().__init__(msg, *args)