-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mypy error: found module but no type hints or library stubs #331
Labels
enhancement
New feature or request
Comments
Thanks - I didn't know this was needed! |
Tested it like this, against a freshly built
I tested against the My import sqlite_utils
from typing import cast
if __name__ == "__main__":
db = sqlite_utils.Database(memory=True)
table = cast(sqlite_utils.db.Table, db["foo"])
table.insert({"id": 5})
print(list(db.query("select * from foo"))) That
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While using sqlite-utils as a library, when I use mypy for static type checking, it throws an error:
When I add a
py.typed
file to the sqlite-utils package to mark it as PEP 561 compatible, the error goes away.I would like to suggest adding a
py.typed
file to the repository.See also the mypy docs on creating PEP 561 compatible packages:
https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages
The text was updated successfully, but these errors were encountered: