| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,4 +203,4 @@ def abspath(self) -> PathLike: | |||
| 203 | 203 | if self.repo.working_tree_dir is not None: | |
| 204 | 204 | return join_path_native(self.repo.working_tree_dir, self.path) | |
| 205 | 205 | else: | |
| 206 | - raise WorkTreeRepositoryUnsupported | ||
| 206 | + raise WorkTreeRepositoryUnsupported("Working_tree_dir was None or empty") | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ | |||
| 4 | 4 | # This module is part of GitPython and is released under | |
| 5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 6 | 6 | from mimetypes import guess_type | |
| 7 | + from typing import Tuple, Union | ||
| 7 | 8 | from . import base | |
| 8 | 9 | ||
| 9 | 10 | __all__ = ('Blob', ) | |
@@ -23,7 +24,7 @@ class Blob(base.IndexObject): | |||
| 23 | 24 | __slots__ = () | |
| 24 | 25 | ||
| 25 | 26 | @property | |
| 26 | - def mime_type(self): | ||
| 27 | + def mime_type(self) -> Union[None, Tuple[Union[None, str], Union[None, str]]]: | ||
| 27 | 28 | """ | |
| 28 | 29 | :return: String describing the mime type of this file (based on the filename) | |
| 29 | 30 | :note: Defaults to 'text/plain' in case the actual file type is unknown. """ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments