@@ -721,7 +721,7 @@ def location(self, x: Optional[int] = None, y: Optional[int]
721721 self .stream .write (self .restore )
722722 self .stream .flush ()
723723
724- def get_location (self , timeout : Optional [ float ] = None ) -> Tuple [int , int ]:
724+ def get_location (self , timeout : float = 1 ) -> Tuple [int , int ]:
725725 r"""
726726 Return tuple (row, column) of cursor position.
727727
@@ -798,7 +798,7 @@ def get_location(self, timeout: Optional[float] = None) -> Tuple[int, int]:
798798 # rather than crowbarring such logic into an exception handler.
799799 return - 1 , - 1
800800
801- def get_fgcolor (self , timeout : Optional [ float ] = None ) -> Tuple [int , int , int ]:
801+ def get_fgcolor (self , timeout : float = 1 ) -> Tuple [int , int , int ]:
802802 """
803803 Return tuple (r, g, b) of foreground color.
804804
@@ -813,11 +813,13 @@ def get_fgcolor(self, timeout: Optional[float] = None) -> Tuple[int, int, int]:
813813
814814 The foreground color is determined by emitting an `OSC 10 color query
815815 <https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands>`_.
816+
817+ See also :meth:`~.Terminal.get_bgcolor` for querying the background color.
816818 """
817819 match = self ._query_response ('\x1b ]10;?\x07 ' , RE_GET_FGCOLOR_RESPONSE , timeout )
818820 return tuple (int (val , 16 ) for val in match .groups ()) if match else (- 1 , - 1 , - 1 )
819821
820- def get_bgcolor (self , timeout : Optional [ float ] = None ) -> Tuple [int , int , int ]:
822+ def get_bgcolor (self , timeout : float = 1 ) -> Tuple [int , int , int ]:
821823 """
822824 Return tuple (r, g, b) of background color.
823825
@@ -832,6 +834,8 @@ def get_bgcolor(self, timeout: Optional[float] = None) -> Tuple[int, int, int]:
832834
833835 The background color is determined by emitting an `OSC 11 color query
834836 <https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands>`_.
837+
838+ See also :meth:`~.Terminal.get_fgcolor` for querying the foreground color.
835839 """
836840 match = self ._query_response ('\x1b ]11;?\x07 ' , RE_GET_BGCOLOR_RESPONSE , timeout )
837841 return tuple (int (val , 16 ) for val in match .groups ()) if match else (- 1 , - 1 , - 1 )
@@ -976,7 +980,7 @@ def does_sixel(self, timeout: Optional[float] = 1.0, force: bool = False) -> boo
976980 return da .supports_sixel if da is not None else False
977981
978982 def get_dec_mode (self , mode : Union [int , _DecPrivateMode ],
979- timeout : Optional [ float ] = None , force : bool = False ) -> DecModeResponse :
983+ timeout : float = 1.0 , force : bool = False ) -> DecModeResponse :
980984 """
981985 Query the state of a DEC Private Mode (DECRQM).
982986
@@ -1005,7 +1009,7 @@ def get_dec_mode(self, mode: Union[int, _DecPrivateMode],
10051009 re-inquiry unless ``force=True``. Although there are special cases
10061010 where a user may re-configure their terminal settings after the state
10071011 was requested by an application, the application is generally restarted
1008- to recognize the new settings rather than to repeatidly re-inquire about
1012+ to recognize the new settings rather than to repeatedly re-inquire about
10091013 their latest value!
10101014
10111015 :arg mode: DEC Private Mode to query
0 commit comments