summaryrefslogtreecommitdiff
path: root/git/objects/blob.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-06-18 11:28:33 +0800
committerGitHub <noreply@github.com>2021-06-18 11:28:33 +0800
commit6a0d131ece696f259e7ab42a064ceb10dabb1fcc (patch)
treefb07007006ec6af0dccbcd6a62abc4c6589dcfd3 /git/objects/blob.py
parentb0f79c58ad919e90261d1e332df79a4ad0bc40de (diff)
parent18b6aa55309adfa8aa99bdaf9e8f80337befe74e (diff)
downloadgitpython-6a0d131ece696f259e7ab42a064ceb10dabb1fcc.tar.gz
Merge pull request #1271 from Yobmod/main
Add initial types to object, and fix CI
Diffstat (limited to 'git/objects/blob.py')
-rw-r--r--git/objects/blob.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/objects/blob.py b/git/objects/blob.py
index 897f892b..017178f0 100644
--- a/git/objects/blob.py
+++ b/git/objects/blob.py
@@ -23,11 +23,11 @@ class Blob(base.IndexObject):
__slots__ = ()
@property
- def mime_type(self):
+ def mime_type(self) -> 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. """
guesses = None
if self.path:
- guesses = guess_type(self.path)
+ guesses = guess_type(str(self.path))
return guesses and guesses[0] or self.DEFAULT_MIME_TYPE