@@ -346,7 +346,7 @@ def set_option(
346
346
self ,
347
347
option : str ,
348
348
value : t .Union [int , str ],
349
- format : t .Optional [bool ] = None ,
349
+ _format : t .Optional [bool ] = None ,
350
350
unset : t .Optional [bool ] = None ,
351
351
unset_panes : t .Optional [bool ] = None ,
352
352
prevent_overwrite : t .Optional [bool ] = None ,
@@ -385,8 +385,8 @@ def set_option(
385
385
assert isinstance (unset_panes , bool )
386
386
flags .append ("-U" )
387
387
388
- if format is not None and format :
389
- assert isinstance (format , bool )
388
+ if _format is not None and _format :
389
+ assert isinstance (_format , bool )
390
390
flags .append ("-F" )
391
391
392
392
if prevent_overwrite is not None and prevent_overwrite :
@@ -419,11 +419,18 @@ def set_option(
419
419
return self
420
420
421
421
def show_window_options (self , g : t .Optional [bool ] = False ) -> "WindowOptionDict" :
422
- """Return dict of options for window.
422
+ """Show options for tmux window. Deprecated by :meth:`Window.show_options()` .
423
423
424
- .. versionchanged:: 0.13.0
424
+ .. deprecated:: 0.26
425
+
426
+ Deprecated by :meth:`Window.show_options()`.
427
+
428
+ """
429
+ warnings .warn ("Window.show_window_options() is deprecated" , stacklevel = 2 )
430
+ return self .show_options (g = g )
425
431
426
- ``option`` removed, use show_window_option to return an individual option.
432
+ def show_options (self , g : t .Optional [bool ] = False ) -> "WindowOptionDict" :
433
+ """Return a dict of options for the window.
427
434
428
435
Parameters
429
436
----------
@@ -462,6 +469,19 @@ def show_window_option(
462
469
self ,
463
470
option : str ,
464
471
g : bool = False ,
472
+ ) -> t .Optional [t .Union [str , int ]]:
473
+ """Return option for target window. Deprecated by :meth:`Window.show_option()`.
474
+
475
+ .. deprecated:: 0.26
476
+
477
+ Deprecated by :meth:`Window.show_option()`.
478
+
479
+ """
480
+ warnings .warn ("Window.show_window_option() is deprecated" , stacklevel = 2 )
481
+ return self .show_option (option = option , g = g )
482
+
483
+ def show_option (
484
+ self , option : str , g : bool = False
465
485
) -> t .Optional [t .Union [str , int ]]:
466
486
"""Return option value for the target window.
467
487
0 commit comments