@@ -112,7 +112,7 @@ def __init__(
112112 metadata : Dict [str , Any ],
113113 types : Dict [int , Any ],
114114 decode : TDecodeMode = True ,
115- err_cb : Callable [[str ], None ] = None
115+ err_cb : Optional [ Callable [[str ], None ] ] = None
116116 ):
117117 """Initialize a new Nvim instance. This method is module-private."""
118118 self ._session = session
@@ -142,7 +142,7 @@ def __init__(
142142 self ._err_cb = err_cb
143143 self .loop = self ._session .loop ._loop
144144
145- def _from_nvim (self , obj : Any , decode : TDecodeMode = None ) -> Any :
145+ def _from_nvim (self , obj : Any , decode : Optional [ TDecodeMode ] = None ) -> Any :
146146 if decode is None :
147147 decode = self ._decode
148148 if type (obj ) is ExtType :
@@ -213,8 +213,8 @@ def run_loop(
213213 self ,
214214 request_cb : Optional [Callable [[str , List [Any ]], Any ]],
215215 notification_cb : Optional [Callable [[str , List [Any ]], Any ]],
216- setup_cb : Callable [[], None ] = None ,
217- err_cb : Callable [[str ], Any ] = None
216+ setup_cb : Optional [ Callable [[], None ] ] = None ,
217+ err_cb : Optional [ Callable [[str ], Any ] ] = None
218218 ) -> None :
219219 """Run the event loop to receive requests and notifications from Nvim.
220220
@@ -275,7 +275,7 @@ def with_decode(self, decode: Literal[True] = True) -> 'Nvim':
275275 self .metadata , self .types , decode , self ._err_cb )
276276
277277 def ui_attach (
278- self , width : int , height : int , rgb : bool = None , ** kwargs : Any
278+ self , width : int , height : int , rgb : Optional [ bool ] = None , ** kwargs : Any
279279 ) -> None :
280280 """Register as a remote UI.
281281
@@ -375,14 +375,7 @@ def chdir(self, dir_path: str) -> None:
375375 return self .request ('nvim_set_current_dir' , dir_path )
376376
377377 def feedkeys (self , keys : str , options : str = '' , escape_csi : bool = True ) -> None :
378- """Push `keys` to Nvim user input buffer.
379-
380- Options can be a string with the following character flags:
381- - 'm': Remap keys. This is default.
382- - 'n': Do not remap keys.
383- - 't': Handle keys as if typed; otherwise they are handled as if coming
384- from a mapping. This matters for undo, opening folds, etc.
385- """
378+ """Push `keys` to Nvim user input buffer."""
386379 return self .request ('nvim_feedkeys' , keys , options , escape_csi )
387380
388381 def input (self , bytes : AnyStr ) -> int :
0 commit comments