Skip to content

Commit c242b55

Browse files
committed
Add types to objects.util.py ProcessStreamAdapter
1 parent da88d36 commit c242b55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git/objects/util.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from datetime import datetime, timedelta, tzinfo
1919

2020
# typing ------------------------------------------------------------
21-
from typing import TYPE_CHECKING, Tuple, Type, Union, cast
21+
from typing import Any, IO, TYPE_CHECKING, Tuple, Type, Union, cast
2222

2323
if TYPE_CHECKING:
2424
from .commit import Commit
@@ -262,11 +262,11 @@ class ProcessStreamAdapter(object):
262262
it if the instance goes out of scope."""
263263
__slots__ = ("_proc", "_stream")
264264

265-
def __init__(self, process: 'Popen', stream_name: str):
265+
def __init__(self, process: 'Popen', stream_name: str) -> None:
266266
self._proc = process
267-
self._stream = getattr(process, stream_name)
267+
self._stream = getattr(process, stream_name) # type: IO[str] ## guess
268268

269-
def __getattr__(self, attr):
269+
def __getattr__(self, attr: str) -> Any:
270270
return getattr(self._stream, attr)
271271

272272

0 commit comments

Comments
 (0)