|
19 | 19 | import threading |
20 | 20 | from collections import OrderedDict |
21 | 21 | from textwrap import dedent |
22 | | -from typing import Any, Callable, Optional, Type |
23 | 22 |
|
24 | 23 | from git.compat import ( |
25 | 24 | defenc, |
|
58 | 57 | ## @{ |
59 | 58 |
|
60 | 59 | def handle_process_output(process, stdout_handler, stderr_handler, |
61 | | - finalizer=None, decode_streams: bool=True) -> Optional[Any]: |
| 60 | + finalizer=None, decode_streams=True): |
62 | 61 | """Registers for notifications to learn that process output is ready to read, and dispatches lines to |
63 | 62 | the respective line handlers. |
64 | 63 | This function returns once the finalizer returns |
@@ -114,11 +113,9 @@ def pump_stream(cmdline, name, stream, is_decode, handler): |
114 | 113 |
|
115 | 114 | if finalizer: |
116 | 115 | return finalizer(process) |
117 | | - else: |
118 | | - return None |
119 | 116 |
|
120 | 117 |
|
121 | | -def dashify(string: str) -> str: |
| 118 | +def dashify(string): |
122 | 119 | return string.replace('_', '-') |
123 | 120 |
|
124 | 121 |
|
@@ -307,11 +304,11 @@ def refresh(cls, path=None): |
307 | 304 | return has_git |
308 | 305 |
|
309 | 306 | @classmethod |
310 | | - def is_cygwin(cls) -> bool: |
| 307 | + def is_cygwin(cls): |
311 | 308 | return is_cygwin_git(cls.GIT_PYTHON_GIT_EXECUTABLE) |
312 | 309 |
|
313 | 310 | @classmethod |
314 | | - def polish_url(cls, url, is_cygwin: Optional[bool]=None): |
| 311 | + def polish_url(cls, url, is_cygwin=None): |
315 | 312 | if is_cygwin is None: |
316 | 313 | is_cygwin = cls.is_cygwin() |
317 | 314 |
|
|
0 commit comments