summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-16 21:21:44 +0100
committerYobmod <yobmod@gmail.com>2021-05-16 21:21:44 +0100
commit595181da70978ed44983a6c0ca4cb6d982ba0e8b (patch)
treede94a35c9bb218ff09324050500d7a0f81b230b2 /git/cmd.py
parentf58702b0c3a0bb58d49b995a7e5479a7b24933e4 (diff)
downloadgitpython-595181da70978ed44983a6c0ca4cb6d982ba0e8b.tar.gz
flake8 and mypy fixes
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/cmd.py b/git/cmd.py
index d46ccef3..d8b82352 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -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)