summaryrefslogtreecommitdiff
path: root/git/compat.py
diff options
context:
space:
mode:
authorjmcgill298 <jacob@networktocode.com>2021-04-21 16:35:27 -0400
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-04-22 09:36:14 +0800
commit3211ae9dbfc6aadd2dd1d7d0f9f3af37ead19383 (patch)
tree4f98f02828a2c88eb345e279e6c6b4d06d4daccd /git/compat.py
parentd0fb22b4f5f94da44075d8c43da24b344ae3f0da (diff)
downloadgitpython-3211ae9dbfc6aadd2dd1d7d0f9f3af37ead19383.tar.gz
Revert compiling GitCommand shell messages
Diffstat (limited to 'git/compat.py')
-rw-r--r--git/compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/compat.py b/git/compat.py
index a0aea1ac..c9b83ba4 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -18,7 +18,7 @@ from gitdb.utils.encoding import (
# typing --------------------------------------------------------------------
-from typing import Any, AnyStr, Dict, Optional, Type
+from typing import IO, Any, AnyStr, Dict, Optional, Type, Union
from git.types import TBD
# ---------------------------------------------------------------------------
@@ -30,7 +30,7 @@ is_darwin = (os.name == 'darwin')
defenc = sys.getfilesystemencoding()
-def safe_decode(s: Optional[AnyStr]) -> Optional[str]:
+def safe_decode(s: Union[IO[str], AnyStr, None]) -> Optional[str]:
"""Safely decodes a binary string to unicode"""
if isinstance(s, str):
return s