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

Docstrings #32

Open
henribru opened this issue Dec 22, 2022 · 3 comments
Open

Docstrings #32

henribru opened this issue Dec 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@henribru
Copy link
Owner

henribru commented Dec 22, 2022

The methods that google-api-python-client generates at runtime actually has docstrings. It would be useful to add these in the stubs so that they're shown in your IDE

@henribru
Copy link
Owner Author

I have a proof of concept for this now. The only issue is that it increases the size of the package from about 20MB to about 160MB ... But it gives a pretty nice DX in VS Code:
Before:
image
After:
image
image

@henribru
Copy link
Owner Author

Though that's the size on disk, the download size goes from about 2MB to 18MB since it's compressed.

For comparison the size on disk for google-api-python-client itself is about 74MB, so the stubs would be a bit more than double the size. Might be fine though, at least if it doesn't negatively affects type-checking time

@mkbabb
Copy link

mkbabb commented Jan 5, 2023

I like this, especially if they're already in the docs. Regarding the size issue, maybe a workaround would be to implement something like what boto3's stubs have done - allowing for the grouping of stubs whilst also having the user manually select which API's they want.

@henribru henribru added the enhancement New feature or request label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants