There was an error while loading. Please reload this page.
1 parent 11837f6 commit 434306eCopy full SHA for 434306e
2 files changed
git/objects/base.py
@@ -203,4 +203,4 @@ def abspath(self) -> PathLike:
203
if self.repo.working_tree_dir is not None:
204
return join_path_native(self.repo.working_tree_dir, self.path)
205
else:
206
- raise WorkTreeRepositoryUnsupported
+ raise WorkTreeRepositoryUnsupported("Working_tree_dir was None or empty")
git/objects/blob.py
@@ -4,6 +4,7 @@
4
# This module is part of GitPython and is released under
5
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6
from mimetypes import guess_type
7
+from typing import Tuple, Union
8
from . import base
9
10
__all__ = ('Blob', )
@@ -23,7 +24,7 @@ class Blob(base.IndexObject):
23
24
__slots__ = ()
25
26
@property
- def mime_type(self):
27
+ def mime_type(self) -> Union[None, Tuple[Union[None, str], Union[None, str]]]:
28
"""
29
:return: String describing the mime type of this file (based on the filename)
30
:note: Defaults to 'text/plain' in case the actual file type is unknown. """
0 commit comments