ソースを参照

Make type a property

John Carr 16 年 前
コミット
4aeae184b3
1 ファイル変更4 行追加0 行削除
  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)