diff options
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -19,7 +19,6 @@ import sys import threading from collections import OrderedDict from textwrap import dedent -from typing import Any, Callable, Optional, Type from git.compat import ( defenc, @@ -58,7 +57,7 @@ __all__ = ('Git',) ## @{ def handle_process_output(process, stdout_handler, stderr_handler, - finalizer=None, decode_streams: bool=True) -> Optional[Any]: + finalizer=None, decode_streams=True): """Registers for notifications to learn that process output is ready to read, and dispatches lines to the respective line handlers. This function returns once the finalizer returns @@ -114,11 +113,9 @@ def handle_process_output(process, stdout_handler, stderr_handler, if finalizer: return finalizer(process) - else: - return None -def dashify(string: str) -> str: +def dashify(string): return string.replace('_', '-') @@ -307,11 +304,11 @@ class Git(LazyMixin): return has_git @classmethod - def is_cygwin(cls) -> bool: + def is_cygwin(cls): return is_cygwin_git(cls.GIT_PYTHON_GIT_EXECUTABLE) @classmethod - def polish_url(cls, url, is_cygwin: Optional[bool]=None): + def polish_url(cls, url, is_cygwin=None): if is_cygwin is None: is_cygwin = cls.is_cygwin() |