type returns a constant which were integers.
https://www.pygit2.org/objects.html#pygit2.Object.type
I should add some tests.