You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently tantivy-py does not include .pyi file, so developers have to investigate the source code to figure out what classes/methods are supported in this package.
Yet, for a better user experience, Python libraries should provide typing hints and documentation for all public entities, so that IDEs can show them during development and type analyzing tools such as mypy can use them to properly verify the code.
Currently the best solution for the problem is to manually maintain *.pyi files and ship them along with the package.
It would be great to have tantivy.pyi and py.typed in the Python source dir so that developers get the benefits of powerful IDE suggestions and validate their code by linters such as mypy.
Does this make sense?
Bonus: We could generate API documentation using pdoc by providing .pyi with type stubs. PyO3/pyo3#2330
The text was updated successfully, but these errors were encountered:
Currently
tantivy-py
does not include.pyi
file, so developers have to investigate the source code to figure out what classes/methods are supported in this package.PyO3 documentation says:
It would be great to have
tantivy.pyi
andpy.typed
in the Python source dir so that developers get the benefits of powerful IDE suggestions and validate their code by linters such as mypy.Does this make sense?
Bonus: We could generate API documentation using pdoc by providing
.pyi
with type stubs.PyO3/pyo3#2330
The text was updated successfully, but these errors were encountered: