소스 검색

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)