@@ -436,11 +436,11 @@ def select_layout(self, layout: str | None = None) -> Window:
436
436
437
437
return self
438
438
439
- def set_window_option (
439
+ def set_option (
440
440
self ,
441
441
option : str ,
442
442
value : int | str ,
443
- format : bool | None = None ,
443
+ _format : bool | None = None ,
444
444
unset : bool | None = None ,
445
445
unset_panes : bool | None = None ,
446
446
prevent_overwrite : bool | None = None ,
@@ -479,8 +479,8 @@ def set_window_option(
479
479
assert isinstance (unset_panes , bool )
480
480
flags .append ("-U" )
481
481
482
- if format is not None and format :
483
- assert isinstance (format , bool )
482
+ if _format is not None and _format :
483
+ assert isinstance (_format , bool )
484
484
flags .append ("-F" )
485
485
486
486
if prevent_overwrite is not None and prevent_overwrite :
@@ -1012,6 +1012,25 @@ def kill_window(self) -> None:
1012
1012
if proc .stderr :
1013
1013
raise exc .LibTmuxException (proc .stderr )
1014
1014
1015
+ def set_window_option (
1016
+ self ,
1017
+ option : str ,
1018
+ value : int | str ,
1019
+ ) -> Window :
1020
+ """Set option for tmux window. Deprecated by :meth:`Window.set_option()`.
1021
+
1022
+ .. deprecated:: 0.26
1023
+
1024
+ Deprecated by :meth:`Window.set_option()`.
1025
+
1026
+ """
1027
+ warnings .warn (
1028
+ "Window.set_window_option() is deprecated" ,
1029
+ category = DeprecationWarning ,
1030
+ stacklevel = 2 ,
1031
+ )
1032
+ return self .set_option (option = option , value = value )
1033
+
1015
1034
def get (self , key : str , default : t .Any | None = None ) -> t .Any :
1016
1035
"""Return key-based lookup. Deprecated by attributes.
1017
1036
0 commit comments