Add stubs for pygit2 (#11374)

The upstream library is very tricky to type (likely requires nontrivial
refactoring), and only contains partial type information, but stubs are
a lot easier because only the public signatures are involved this way,
so I plan to first make the library usable in typed projects by making
stubs available here, then gradually work my way upstream.

The stubs are auto-generated then completed with fully manual inspection
of every Python source file. The `_pygit2.pyi` comes from upstream and
is mostly untouched except for required style changes, the signature of
`options()`, and `FilterSource` which is missing from upstream.
This commit is contained in:
WÁNG Xuěruì
2024-03-11 22:48:12 -07:00
committed by GitHub
parent dea4dd1dc1
commit 9a4b605065
28 changed files with 2118 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@
"stubs/psycopg2",
"stubs/pyasn1",
"stubs/pyflakes",
"stubs/pygit2",
"stubs/Pygments",
"stubs/PyMySQL",
"stubs/python-dateutil",