Skip to content

Add Documentation for google-api-python-client-stubs or Provide Built-in Type Annotations #2538

Open
@Demianeen

Description

@Demianeen

While resolving #2537, I discovered that the root cause of my confusion was a lack of type safety for build function. I initially passed credentials as a positional argument instead of using the credentials= keyword, which could have been caught immediately if the method signature and documentation were more explicit.

What I mean, this is how types look for build function:
Arc 2024-12-19 07 27 57

I found that python has stubs feature, similar to @types packages in npm, but there was no mention of it in google docs. Which bings me to this issue.

It would be ideal to provide built-in type annotation. But as a workaround it would be really beneficial to add mention of google-api-python-client-stubs in the docs. It will help new python users like myself help avoid such simple and time-consuming mistakes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions