@@ -35,7 +35,7 @@ def __init__(
35
35
list_cmd : t .Optional [str ] = None ,
36
36
list_extra_args : "t.Optional[ListExtraArgs]" = None ,
37
37
* args : object ,
38
- ):
38
+ ) -> None :
39
39
if all (arg is not None for arg in [obj_key , obj_id , list_cmd , list_extra_args ]):
40
40
return super ().__init__ (
41
41
f"Could not find { obj_key } ={ obj_id } for { list_cmd } "
@@ -56,7 +56,7 @@ def __init__(
56
56
reason : str ,
57
57
session_name : t .Optional [str ] = None ,
58
58
* args : object ,
59
- ):
59
+ ) -> None :
60
60
msg = f"Bad session name: { reason } "
61
61
if session_name is not None :
62
62
msg += f" (session name: { session_name } )"
@@ -74,7 +74,7 @@ class UnknownOption(OptionError):
74
74
class UnknownColorOption (UnknownOption ):
75
75
"""Unknown color option."""
76
76
77
- def __init__ (self , * args : object ):
77
+ def __init__ (self , * args : object ) -> None :
78
78
return super ().__init__ ("Server.colors must equal 88 or 256" )
79
79
80
80
@@ -93,7 +93,7 @@ class WaitTimeout(LibTmuxException):
93
93
class VariableUnpackingError (LibTmuxException ):
94
94
"""Error unpacking variable."""
95
95
96
- def __init__ (self , variable : t .Optional [t .Any ] = None , * args : object ):
96
+ def __init__ (self , variable : t .Optional [t .Any ] = None , * args : object ) -> None :
97
97
return super ().__init__ (f"Unexpected variable: { variable !s} " )
98
98
99
99
@@ -104,7 +104,7 @@ class PaneError(LibTmuxException):
104
104
class PaneNotFound (PaneError ):
105
105
"""Pane not found."""
106
106
107
- def __init__ (self , pane_id : t .Optional [str ] = None , * args : object ):
107
+ def __init__ (self , pane_id : t .Optional [str ] = None , * args : object ) -> None :
108
108
if pane_id is not None :
109
109
return super ().__init__ (f"Pane not found: { pane_id } " )
110
110
return super ().__init__ ("Pane not found" )
@@ -117,21 +117,21 @@ class WindowError(LibTmuxException):
117
117
class MultipleActiveWindows (WindowError ):
118
118
"""Multiple active windows."""
119
119
120
- def __init__ (self , count : int , * args : object ):
120
+ def __init__ (self , count : int , * args : object ) -> None :
121
121
return super ().__init__ (f"Multiple active windows: { count } found" )
122
122
123
123
124
124
class NoActiveWindow (WindowError ):
125
125
"""No active window found."""
126
126
127
- def __init__ (self , * args : object ):
127
+ def __init__ (self , * args : object ) -> None :
128
128
return super ().__init__ ("No active windows found" )
129
129
130
130
131
131
class NoWindowsExist (WindowError ):
132
132
"""No windows exist for object."""
133
133
134
- def __init__ (self , * args : object ):
134
+ def __init__ (self , * args : object ) -> None :
135
135
return super ().__init__ ("No windows exist for object" )
136
136
137
137
@@ -143,20 +143,18 @@ def __init__(self) -> None:
143
143
144
144
145
145
class WindowAdjustmentDirectionRequiresAdjustment (
146
- WindowError , AdjustmentDirectionRequiresAdjustment
146
+ WindowError ,
147
+ AdjustmentDirectionRequiresAdjustment ,
147
148
):
148
149
"""ValueError for :meth:`libtmux.Window.resize_window`."""
149
150
150
- pass
151
-
152
151
153
152
class PaneAdjustmentDirectionRequiresAdjustment (
154
- WindowError , AdjustmentDirectionRequiresAdjustment
153
+ WindowError ,
154
+ AdjustmentDirectionRequiresAdjustment ,
155
155
):
156
156
"""ValueError for :meth:`libtmux.Pane.resize_pane`."""
157
157
158
- pass
159
-
160
158
161
159
class RequiresDigitOrPercentage (LibTmuxException , ValueError ):
162
160
"""Requires digit (int or str digit) or a percentage."""
0 commit comments