1919import threading
2020from collections import OrderedDict
2121from textwrap import dedent
22- from typing import Any , Callable , Optional , Type
2322
2423from git .compat import (
2524 defenc ,
5857## @{
5958
6059def handle_process_output (process , stdout_handler , stderr_handler ,
61- finalizer = None , decode_streams : bool = True ) -> Optional [ Any ] :
60+ finalizer = None , decode_streams = True ):
6261 """Registers for notifications to learn that process output is ready to read, and dispatches lines to
6362 the respective line handlers.
6463 This function returns once the finalizer returns
@@ -114,11 +113,9 @@ def pump_stream(cmdline, name, stream, is_decode, handler):
114113
115114 if finalizer :
116115 return finalizer (process )
117- else :
118- return None
119116
120117
121- def dashify (string : str ) -> str :
118+ def dashify (string ) :
122119 return string .replace ('_' , '-' )
123120
124121
@@ -307,11 +304,11 @@ def refresh(cls, path=None):
307304 return has_git
308305
309306 @classmethod
310- def is_cygwin (cls ) -> bool :
307+ def is_cygwin (cls ):
311308 return is_cygwin_git (cls .GIT_PYTHON_GIT_EXECUTABLE )
312309
313310 @classmethod
314- def polish_url (cls , url , is_cygwin : Optional [ bool ] = None ):
311+ def polish_url (cls , url , is_cygwin = None ):
315312 if is_cygwin is None :
316313 is_cygwin = cls .is_cygwin ()
317314
0 commit comments