Browse Source

Make type a property

John Carr 16 năm trước cách đây
mục cha
commit
4aeae184b3
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      dulwich/objects.py

+ 4 - 0
dulwich/objects.py

@@ -173,6 +173,10 @@ class ShaFile(object):
   def id(self):
       return self.sha().hexdigest()
 
+  @property
+  def type(self):
+      return self._num_type
+
   def __repr__(self):
     return "<%s %s>" % (self.__class__.__name__, self.id)