@@ -20,8 +20,13 @@ class WorkspaceError(TmuxpException):
20
20
21
21
22
22
class SessionNotFound (TmuxpException ):
23
+ """tmux session not found."""
24
+
23
25
def __init__ (
24
- self , session_target : t .Optional [str ] = None , * args : object , ** kwargs : object
26
+ self ,
27
+ session_target : t .Optional [str ] = None ,
28
+ * args : object ,
29
+ ** kwargs : object ,
25
30
) -> None :
26
31
msg = "Session not found"
27
32
if session_target is not None :
@@ -30,8 +35,13 @@ def __init__(
30
35
31
36
32
37
class WindowNotFound (TmuxpException ):
38
+ """tmux window not found."""
39
+
33
40
def __init__ (
34
- self , window_target : t .Optional [str ] = None , * args : object , ** kwargs : object
41
+ self ,
42
+ window_target : t .Optional [str ] = None ,
43
+ * args : object ,
44
+ ** kwargs : object ,
35
45
) -> None :
36
46
msg = "Window not found"
37
47
if window_target is not None :
@@ -40,8 +50,13 @@ def __init__(
40
50
41
51
42
52
class PaneNotFound (TmuxpException ):
53
+ """tmux pane not found."""
54
+
43
55
def __init__ (
44
- self , pane_target : t .Optional [str ] = None , * args : object , ** kwargs : object
56
+ self ,
57
+ pane_target : t .Optional [str ] = None ,
58
+ * args : object ,
59
+ ** kwargs : object ,
45
60
) -> None :
46
61
msg = "Pane not found"
47
62
if pane_target is not None :
@@ -52,11 +67,17 @@ def __init__(
52
67
class EmptyWorkspaceException (WorkspaceError ):
53
68
"""Workspace file is empty."""
54
69
55
- def __init__ (self , * args : object , ** kwargs : object ) -> None :
70
+ def __init__ (
71
+ self ,
72
+ * args : object ,
73
+ ** kwargs : object ,
74
+ ) -> None :
56
75
return super ().__init__ ("Session configuration is empty." , * args , ** kwargs )
57
76
58
77
59
78
class SessionMissingWorkspaceException (WorkspaceError , ObjectDoesNotExist ):
79
+ """Session missing while loading tmuxp workspace."""
80
+
60
81
def __init__ (self , * args : object , ** kwargs : object ) -> None :
61
82
return super ().__init__ (
62
83
"No session object exists for WorkspaceBuilder. "
@@ -67,6 +88,8 @@ def __init__(self, *args: object, **kwargs: object) -> None:
67
88
68
89
69
90
class ActiveSessionMissingWorkspaceException (WorkspaceError ):
91
+ """Active session cannot be found while loading tmuxp workspace."""
92
+
70
93
def __init__ (self , * args : object , ** kwargs : object ) -> None :
71
94
return super ().__init__ ("No session active." , * args , ** kwargs )
72
95
@@ -76,6 +99,8 @@ class TmuxpPluginException(TmuxpException):
76
99
77
100
78
101
class BeforeLoadScriptNotExists (OSError ):
102
+ """Raises if shell script could not be found."""
103
+
79
104
def __init__ (self , * args : object , ** kwargs : object ) -> None :
80
105
super ().__init__ (* args , ** kwargs )
81
106
@@ -84,7 +109,9 @@ def __init__(self, *args: object, **kwargs: object) -> None:
84
109
85
110
@implements_to_string
86
111
class BeforeLoadScriptError (Exception ):
87
- """Exception replacing :py:class:`subprocess.CalledProcessError` for
112
+ """Shell script execution error.
113
+
114
+ Replaces :py:class:`subprocess.CalledProcessError` for
88
115
:meth:`tmuxp.util.run_before_script`.
89
116
"""
90
117
@@ -102,4 +129,5 @@ def __init__(
102
129
)
103
130
104
131
def __str__ (self ) -> str :
132
+ """Return shell error message."""
105
133
return self .message
0 commit comments