File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,18 @@ if not hasattr(pygit2.enums, 'FileMode'):
4343 # pylint: disable=c-extension-no-member disable=protected-access
4444 BLOB = pygit2 ._pygit2 .GIT_FILEMODE_BLOB
4545 pygit2 .enums .FileMode = FileMode
46+ if not hasattr (pygit2 .enums , 'ObjectType' ):
47+ class ObjectType (enum .IntEnum ):
48+ 'definitions missing in older versions of pygit2'
49+ # pylint: disable=c-extension-no-member disable=protected-access
50+ COMMIT = pygit2 ._pygit2 .GIT_OBJ_COMMIT
51+ # pylint: disable=c-extension-no-member disable=protected-access
52+ TREE = pygit2 ._pygit2 .GIT_OBJ_TREE
53+ # pylint: disable=c-extension-no-member disable=protected-access
54+ BLOB = pygit2 ._pygit2 .GIT_OBJ_BLOB
55+ # pylint: disable=c-extension-no-member disable=protected-access
56+ TAG = pygit2 ._pygit2 .GIT_OBJ_TAG
57+ pygit2 .enums .ObjectType = ObjectType
4658
4759CRYPTREADME = '''# 401 Unauthorized
4860
You can’t perform that action at this time.
0 commit comments