summaryrefslogtreecommitdiff
path: root/lib/git/objects/blob.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-03-04 09:06:03 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-03-04 09:06:03 +0100
commit72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b (patch)
tree09e28dfbad901791a8306e890f69a6b737d20a03 /lib/git/objects/blob.py
parent4956c1e618bfcfeef86c6ea90c22dd04ca81b9db (diff)
downloadgitpython-72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b.tar.gz
Converted all tabs to 4 space characters each to comply with pep8
Diffstat (limited to 'lib/git/objects/blob.py')
-rw-r--r--lib/git/objects/blob.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/git/objects/blob.py b/lib/git/objects/blob.py
index 11dee323..3f91d078 100644
--- a/lib/git/objects/blob.py
+++ b/lib/git/objects/blob.py
@@ -8,29 +8,29 @@ import mimetypes
import base
class Blob(base.IndexObject):
- """A Blob encapsulates a git blob object"""
- DEFAULT_MIME_TYPE = "text/plain"
- type = "blob"
+ """A Blob encapsulates a git blob object"""
+ DEFAULT_MIME_TYPE = "text/plain"
+ type = "blob"
- __slots__ = tuple()
+ __slots__ = tuple()
-
- @property
- def mime_type(self):
- """
- The mime type of this file (based on the filename)
+
+ @property
+ def mime_type(self):
+ """
+ The mime type of this file (based on the filename)
- Returns
- str
-
- NOTE
- Defaults to 'text/plain' in case the actual file type is unknown.
- """
- guesses = None
- if self.path:
- guesses = mimetypes.guess_type(self.path)
- return guesses and guesses[0] or self.DEFAULT_MIME_TYPE
+ Returns
+ str
+
+ NOTE
+ Defaults to 'text/plain' in case the actual file type is unknown.
+ """
+ guesses = None
+ if self.path:
+ guesses = mimetypes.guess_type(self.path)
+ return guesses and guesses[0] or self.DEFAULT_MIME_TYPE
- def __repr__(self):
- return '<git.Blob "%s">' % self.sha
+ def __repr__(self):
+ return '<git.Blob "%s">' % self.sha