summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-20 17:34:26 +0100
committerYobmod <yobmod@gmail.com>2021-05-20 17:34:26 +0100
commitc242b55d7c64ee43405f8b335c762bcf92189d38 (patch)
tree8aebc271280203d0f2efa55839a8ae8ef5128c2f
parentda88d360d040cfde4c2bdb6c2f38218481b9676b (diff)
downloadgitpython-c242b55d7c64ee43405f8b335c762bcf92189d38.tar.gz
Add types to objects.util.py ProcessStreamAdapter
-rw-r--r--git/objects/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/objects/util.py b/git/objects/util.py
index 012f9f23..fdc1406b 100644
--- a/git/objects/util.py
+++ b/git/objects/util.py
@@ -18,7 +18,7 @@ import calendar
from datetime import datetime, timedelta, tzinfo
# typing ------------------------------------------------------------
-from typing import TYPE_CHECKING, Tuple, Type, Union, cast
+from typing import Any, IO, TYPE_CHECKING, Tuple, Type, Union, cast
if TYPE_CHECKING:
from .commit import Commit
@@ -262,11 +262,11 @@ class ProcessStreamAdapter(object):
it if the instance goes out of scope."""
__slots__ = ("_proc", "_stream")
- def __init__(self, process: 'Popen', stream_name: str):
+ def __init__(self, process: 'Popen', stream_name: str) -> None:
self._proc = process
- self._stream = getattr(process, stream_name)
+ self._stream = getattr(process, stream_name) # type: IO[str] ## guess
- def __getattr__(self, attr):
+ def __getattr__(self, attr: str) -> Any:
return getattr(self._stream, attr)