summaryrefslogtreecommitdiff
path: root/git/objects/blob.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-18 14:14:11 +0100
committerYobmod <yobmod@gmail.com>2021-05-18 14:14:11 +0100
commit434306e7d09300b62763b7ebd797d08e7b99ea77 (patch)
tree7ed9b921d2bc7dbf2c0739958bc5bde13feab0f4 /git/objects/blob.py
parent11837f61aa4b5c286c6ee9870e23a7ee342858c5 (diff)
downloadgitpython-434306e7d09300b62763b7ebd797d08e7b99ea77.tar.gz
Add types to objects.blob.py
Diffstat (limited to 'git/objects/blob.py')
-rw-r--r--git/objects/blob.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/objects/blob.py b/git/objects/blob.py
index 897f892b..b027adab 100644
--- a/git/objects/blob.py
+++ b/git/objects/blob.py
@@ -4,6 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from mimetypes import guess_type
+from typing import Tuple, Union
from . import base
__all__ = ('Blob', )
@@ -23,7 +24,7 @@ class Blob(base.IndexObject):
__slots__ = ()
@property
- def mime_type(self):
+ def mime_type(self) -> Union[None, Tuple[Union[None, str], Union[None, str]]]:
"""
:return: String describing the mime type of this file (based on the filename)
:note: Defaults to 'text/plain' in case the actual file type is unknown. """