Skip to content
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

[Feature] mypy typings #569

Open
bryanforbes opened this issue May 5, 2020 · 6 comments
Open

[Feature] mypy typings #569

bryanforbes opened this issue May 5, 2020 · 6 comments

Comments

@bryanforbes
Copy link
Collaborator

Currently, asyncpg is untyped and has to be ignored as an import when using mypy. Because of this, I created an asyncpg-stubs package generated from stubgen that I use in my own projects as a git dependency, but it would be great to have these in the main library (and verified by the developers). If this is something that is desired, I would be willing to create the initial PR.

@1st1
Copy link
Member

1st1 commented May 18, 2020

Yeah, we would love to see typing support in asyncpg.

@cstigen
Copy link

cstigen commented Jul 1, 2022

Any update on whether asyncpg-stubs is planned to get merged into asyncpg?

@DanielNoord
Copy link
Contributor

@1st1 #577 seems a bit too big to merge and review, but there is lots of stuff in that PR that can easily be merged and will help reduce the noise around the more critical/problematic changes. To give an example def _check_conn_validity(self, meth_name: str) -> None:.

Does it make sense to start splitting off some of those contributions into separate PRs so that they can be merged and users can benefit from improved IDE suggestions as well as get #577 more manageable (and therefore more mergeable)?

@DanielNoord
Copy link
Contributor

@elprans I know maintainers time is limited, but you just made a release and therefore seem the most active.

I would like to dedicate time to getting type annotations for asyncpg to at least partially work, but it seems there is limited time to review PRs. Is there anyway that would make it feasible for you to review PRs that add type stubs without changing features of the package?

@elprans
Copy link
Member

elprans commented Oct 22, 2024

Happy to review if the typing-adding PR is split. It's nearly impossible to confidently review #577 as-is.

@DanielNoord
Copy link
Contributor

Cool! I made a first PR to test the waters here: #1197

Let me know if there is anything you need from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants