diff options
author | Yobmod <yobmod@gmail.com> | 2021-05-16 21:21:44 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-05-16 21:21:44 +0100 |
commit | 595181da70978ed44983a6c0ca4cb6d982ba0e8b (patch) | |
tree | de94a35c9bb218ff09324050500d7a0f81b230b2 /git/cmd.py | |
parent | f58702b0c3a0bb58d49b995a7e5479a7b24933e4 (diff) | |
download | gitpython-595181da70978ed44983a6c0ca4cb6d982ba0e8b.tar.gz |
flake8 and mypy fixes
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -615,7 +615,7 @@ class Git(LazyMixin): # END handle version info @property - def working_dir(self) -> Union[None, str]: + def working_dir(self) -> Union[None, PathLike]: """:return: Git directory we are working on""" return self._working_dir @@ -1187,7 +1187,7 @@ class Git(LazyMixin): cmd.stdin.flush() return self._parse_object_header(cmd.stdout.readline()) - def get_object_header(self, ref: AnyStr) -> Tuple[str, str, int]: + def get_object_header(self, ref: str) -> Tuple[str, str, int]: """ Use this method to quickly examine the type and size of the object behind the given ref. @@ -1198,7 +1198,7 @@ class Git(LazyMixin): cmd = self._get_persistent_cmd("cat_file_header", "cat_file", batch_check=True) return self.__get_object_header(cmd, ref) - def get_object_data(self, ref: AnyStr) -> Tuple[str, str, int, bytes]: + def get_object_data(self, ref: str) -> Tuple[str, str, int, bytes]: """ As get_object_header, but returns object data as well :return: (hexsha, type_string, size_as_int,data_string) :note: not threadsafe""" @@ -1207,7 +1207,7 @@ class Git(LazyMixin): del(stream) return (hexsha, typename, size, data) - def stream_object_data(self, ref: AnyStr) -> Tuple[str, str, int, 'Git.CatFileContentStream']: + def stream_object_data(self, ref: str) -> Tuple[str, str, int, 'Git.CatFileContentStream']: """ As get_object_header, but returns the data as a stream :return: (hexsha, type_string, size_as_int, stream) |