libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.58k stars 382 forks source link

type hints: Use `@typing.overload` to specify the return type of `.peel` #1212

Closed wmanley closed 1 year ago

wmanley commented 1 year ago

This way the type checker will know if you write:

commit = tag.peel(pygit2.GIT_OBJ_COMMIT)

that commit is a Commit.