From c242b55d7c64ee43405f8b335c762bcf92189d38 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Thu, 20 May 2021 17:34:26 +0100 Subject: Add types to objects.util.py ProcessStreamAdapter --- git/objects/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'git/objects/util.py') 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) -- cgit v1.2.1