poethepoet.exceptions

 1from typing import Optional
 2
 3
 4# ruff: noqa: N818
 5class PoeException(RuntimeError):
 6    cause: Optional[str]
 7
 8    def __init__(self, msg, *args):
 9        self.msg = msg
10        self.cause = args[0].args[0] if args else None
11        self.args = (msg, *args)
12
13
14class CyclicDependencyError(PoeException):
15    pass
16
17
18class ExpressionParseError(PoeException):
19    pass
20
21
22class ConfigValidationError(PoeException):
23    context: Optional[str]
24    task_name: Optional[str]
25    index: Optional[int]
26    global_option: Optional[str]
27    filename: Optional[str]
28
29    def __init__(
30        self,
31        msg,
32        *args,
33        context: Optional[str] = None,
34        task_name: Optional[str] = None,
35        index: Optional[int] = None,
36        global_option: Optional[str] = None,
37        filename: Optional[str] = None
38    ):
39        super().__init__(msg, *args)
40        self.context = context
41        self.task_name = task_name
42        self.index = index
43        self.global_option = global_option
44        self.filename = filename
45
46
47class ExecutionError(RuntimeError):
48    cause: Optional[str]
49
50    def __init__(self, msg, *args):
51        self.msg = msg
52        self.cause = args[0].args[0] if args else None
53        self.args = (msg, *args)
54
55
56class PoePluginException(PoeException):
57    pass
class PoeException(builtins.RuntimeError):
 6class PoeException(RuntimeError):
 7    cause: Optional[str]
 8
 9    def __init__(self, msg, *args):
10        self.msg = msg
11        self.cause = args[0].args[0] if args else None
12        self.args = (msg, *args)

Unspecified run-time error.

PoeException(msg, *args)
 9    def __init__(self, msg, *args):
10        self.msg = msg
11        self.cause = args[0].args[0] if args else None
12        self.args = (msg, *args)
cause: Optional[str]
msg
args
Inherited Members
builtins.BaseException
with_traceback
add_note
class CyclicDependencyError(PoeException):
15class CyclicDependencyError(PoeException):
16    pass

Unspecified run-time error.

Inherited Members
PoeException
PoeException
cause
msg
args
builtins.BaseException
with_traceback
add_note
class ExpressionParseError(PoeException):
19class ExpressionParseError(PoeException):
20    pass

Unspecified run-time error.

Inherited Members
PoeException
PoeException
cause
msg
args
builtins.BaseException
with_traceback
add_note
class ConfigValidationError(PoeException):
23class ConfigValidationError(PoeException):
24    context: Optional[str]
25    task_name: Optional[str]
26    index: Optional[int]
27    global_option: Optional[str]
28    filename: Optional[str]
29
30    def __init__(
31        self,
32        msg,
33        *args,
34        context: Optional[str] = None,
35        task_name: Optional[str] = None,
36        index: Optional[int] = None,
37        global_option: Optional[str] = None,
38        filename: Optional[str] = None
39    ):
40        super().__init__(msg, *args)
41        self.context = context
42        self.task_name = task_name
43        self.index = index
44        self.global_option = global_option
45        self.filename = filename

Unspecified run-time error.

ConfigValidationError( msg, *args, context: Optional[str] = None, task_name: Optional[str] = None, index: Optional[int] = None, global_option: Optional[str] = None, filename: Optional[str] = None)
30    def __init__(
31        self,
32        msg,
33        *args,
34        context: Optional[str] = None,
35        task_name: Optional[str] = None,
36        index: Optional[int] = None,
37        global_option: Optional[str] = None,
38        filename: Optional[str] = None
39    ):
40        super().__init__(msg, *args)
41        self.context = context
42        self.task_name = task_name
43        self.index = index
44        self.global_option = global_option
45        self.filename = filename
context: Optional[str]
task_name: Optional[str]
index: Optional[int]
global_option: Optional[str]
filename: Optional[str]
Inherited Members
PoeException
cause
msg
args
builtins.BaseException
with_traceback
add_note
class ExecutionError(builtins.RuntimeError):
48class ExecutionError(RuntimeError):
49    cause: Optional[str]
50
51    def __init__(self, msg, *args):
52        self.msg = msg
53        self.cause = args[0].args[0] if args else None
54        self.args = (msg, *args)

Unspecified run-time error.

ExecutionError(msg, *args)
51    def __init__(self, msg, *args):
52        self.msg = msg
53        self.cause = args[0].args[0] if args else None
54        self.args = (msg, *args)
cause: Optional[str]
msg
args
Inherited Members
builtins.BaseException
with_traceback
add_note
class PoePluginException(PoeException):
57class PoePluginException(PoeException):
58    pass

Unspecified run-time error.

Inherited Members
PoeException
PoeException
cause
msg
args
builtins.BaseException
with_traceback
add_note