diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-19 19:10:45 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-19 19:10:45 +0100 |
commit | 9e5e969479ec6018e1ba06b95bcdefca5b0082a4 (patch) | |
tree | 574e03c6c4acd1067e3b285974651ec9e9529a49 /git/util.py | |
parent | 9a587e14d509cc77bf47b9591d1def3e5a1df570 (diff) | |
download | gitpython-9e5e969479ec6018e1ba06b95bcdefca5b0082a4.tar.gz |
Change remaining type comments to py3.6+ types
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/git/util.py b/git/util.py index c04e2927..c0c0ecb7 100644 --- a/git/util.py +++ b/git/util.py @@ -267,7 +267,7 @@ def _cygexpath(drive: Optional[str], path: str) -> str: return p_str.replace('\\', '/') -_cygpath_parsers = ( +_cygpath_parsers: Tuple[Tuple[Pattern[str], Callable, bool], ...] = ( # See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx # and: https://www.cygwin.com/cygwin-ug-net/using.html#unc-paths (re.compile(r"\\\\\?\\UNC\\([^\\]+)\\([^\\]+)(?:\\(.*))?"), @@ -294,7 +294,7 @@ _cygpath_parsers = ( (lambda url: url), False ), -) # type: Tuple[Tuple[Pattern[str], Callable, bool], ...] +) def cygpath(path: str) -> str: @@ -330,7 +330,7 @@ def decygpath(path: PathLike) -> str: #: Store boolean flags denoting if a specific Git executable #: is from a Cygwin installation (since `cache_lru()` unsupported on PY2). -_is_cygwin_cache = {} # type: Dict[str, Optional[bool]] +_is_cygwin_cache: Dict[str, Optional[bool]] = {} @overload @@ -462,10 +462,10 @@ class RemoteProgress(object): re_op_relative = re.compile(r"(remote: )?([\w\s]+):\s+(\d+)% \((\d+)/(\d+)\)(.*)") def __init__(self) -> None: - self._seen_ops = [] # type: List[int] - self._cur_line = None # type: Optional[str] - self.error_lines = [] # type: List[str] - self.other_lines = [] # type: List[str] + self._seen_ops: List[int] = [] + self._cur_line: Optional[str] = None + self.error_lines: List[str] = [] + self.other_lines: List[str] = [] def _parse_progress_line(self, line: AnyStr) -> None: """Parse progress information from the given line as retrieved by git-push |