-
Notifications
You must be signed in to change notification settings - Fork 64
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
psycopg2-stubs shadow typeshed stubs #74
Comments
Yeah that works for me, the only downside I see is the types in the type shed aren't as fleshed out |
I don't know if the stubs in typeshed are less complete. The people over at typeshed are quick to merge PRs, so it shouldn't be too hard to add missing stuff there. |
Yeah I think the type shed will have more stubs since it was created using stub gen, but right now they're a little thin on the type annotations for instance with connection.cursor() as conn:
conn # this will be Any |
Looking at the stubs here, I'm seeing that |
Revisiting this, I think removing the psycopg2 types from this package and using the type shed ones is the way forward |
(had completely forgotten about this issue. Not sure I have a lot of time to make a PR) |
It took me a while to find that it was this package that caused my issue.
There are more complete stubs of psycopg2 in typeshed: https://github.com/python/typeshed/tree/master/stubs/psycopg2 which are automatically released as a PEP 561 package at https://pypi.org/project/types-psycopg2/
Installing both
types-psycopg2
anddjango-types
results in one unpredictibly shadowing the other, so mypy sometimes works and sometimes doesn't. Would you accept a PR that would remove psycopg2 types defined here and rely on the typeshed ones instead ?The text was updated successfully, but these errors were encountered: