◐ Shell
clean mode source ↗

Revise type annotations slightly by EliahKagan · Pull Request #1860 · gitpython-developers/GitPython

Expand Up @@ -749,7 +749,7 @@ class CatFileContentStream: rest to ensure the underlying stream continues to work. """
__slots__: Tuple[str, ...] = ("_stream", "_nbr", "_size") __slots__ = ("_stream", "_nbr", "_size")
def __init__(self, size: int, stream: IO[bytes]) -> None: self._stream = stream Expand Down Expand Up @@ -846,14 +846,14 @@ def __del__(self) -> None: self._stream.read(bytes_left + 1) # END handle incomplete read
def __init__(self, working_dir: Union[None, PathLike] = None): def __init__(self, working_dir: Union[None, PathLike] = None) -> None: """Initialize this instance with:
:param working_dir: Git directory we should work in. If ``None``, we always work in the current directory as returned by :func:`os.getcwd`. This is meant to be the working tree directory if available, or the ``.git`` directory in case of bare repositories. Git directory we should work in. If ``None``, we always work in the current directory as returned by :func:`os.getcwd`. This is meant to be the working tree directory if available, or the ``.git`` directory in case of bare repositories. """ super().__init__() self._working_dir = expand_path(working_dir) Expand Down Expand Up @@ -1103,8 +1103,8 @@ def execute( :raise git.exc.GitCommandError:
:note: If you add additional keyword arguments to the signature of this method, you must update the ``execute_kwargs`` variable housed in this module. If you add additional keyword arguments to the signature of this method, you must update the ``execute_kwargs`` variable housed in this module. """ # Remove password for the command if present. redacted_command = remove_password_if_present(command) Expand Down Expand Up @@ -1438,7 +1438,7 @@ def _call_process(
turns into::
git rev-list max-count 10 --header master git rev-list max-count 10 --header master
:return: Same as :meth:`execute`. If no args are given, used :meth:`execute`'s Expand Down