@@ -35,7 +35,7 @@ def __init__(
3535 list_cmd : t .Optional [str ] = None ,
3636 list_extra_args : "t.Optional[ListExtraArgs]" = None ,
3737 * args : object ,
38- ):
38+ ) -> None :
3939 if all (arg is not None for arg in [obj_key , obj_id , list_cmd , list_extra_args ]):
4040 return super ().__init__ (
4141 f"Could not find { obj_key } ={ obj_id } for { list_cmd } "
@@ -56,7 +56,7 @@ def __init__(
5656 reason : str ,
5757 session_name : t .Optional [str ] = None ,
5858 * args : object ,
59- ):
59+ ) -> None :
6060 msg = f"Bad session name: { reason } "
6161 if session_name is not None :
6262 msg += f" (session name: { session_name } )"
@@ -74,7 +74,7 @@ class UnknownOption(OptionError):
7474class UnknownColorOption (UnknownOption ):
7575 """Unknown color option."""
7676
77- def __init__ (self , * args : object ):
77+ def __init__ (self , * args : object ) -> None :
7878 return super ().__init__ ("Server.colors must equal 88 or 256" )
7979
8080
@@ -93,7 +93,7 @@ class WaitTimeout(LibTmuxException):
9393class VariableUnpackingError (LibTmuxException ):
9494 """Error unpacking variable."""
9595
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 :
9797 return super ().__init__ (f"Unexpected variable: { variable !s} " )
9898
9999
@@ -104,7 +104,7 @@ class PaneError(LibTmuxException):
104104class PaneNotFound (PaneError ):
105105 """Pane not found."""
106106
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 :
108108 if pane_id is not None :
109109 return super ().__init__ (f"Pane not found: { pane_id } " )
110110 return super ().__init__ ("Pane not found" )
@@ -117,21 +117,21 @@ class WindowError(LibTmuxException):
117117class MultipleActiveWindows (WindowError ):
118118 """Multiple active windows."""
119119
120- def __init__ (self , count : int , * args : object ):
120+ def __init__ (self , count : int , * args : object ) -> None :
121121 return super ().__init__ (f"Multiple active windows: { count } found" )
122122
123123
124124class NoActiveWindow (WindowError ):
125125 """No active window found."""
126126
127- def __init__ (self , * args : object ):
127+ def __init__ (self , * args : object ) -> None :
128128 return super ().__init__ ("No active windows found" )
129129
130130
131131class NoWindowsExist (WindowError ):
132132 """No windows exist for object."""
133133
134- def __init__ (self , * args : object ):
134+ def __init__ (self , * args : object ) -> None :
135135 return super ().__init__ ("No windows exist for object" )
136136
137137
@@ -143,20 +143,18 @@ def __init__(self) -> None:
143143
144144
145145class WindowAdjustmentDirectionRequiresAdjustment (
146- WindowError , AdjustmentDirectionRequiresAdjustment
146+ WindowError ,
147+ AdjustmentDirectionRequiresAdjustment ,
147148):
148149 """ValueError for :meth:`libtmux.Window.resize_window`."""
149150
150- pass
151-
152151
153152class PaneAdjustmentDirectionRequiresAdjustment (
154- WindowError , AdjustmentDirectionRequiresAdjustment
153+ WindowError ,
154+ AdjustmentDirectionRequiresAdjustment ,
155155):
156156 """ValueError for :meth:`libtmux.Pane.resize_pane`."""
157157
158- pass
159-
160158
161159class RequiresDigitOrPercentage (LibTmuxException , ValueError ):
162160 """Requires digit (int or str digit) or a percentage."""
0 commit comments