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

Improve type hints, add types to method params #140

Closed
crwilcox opened this issue Aug 4, 2020 · 4 comments · Fixed by #182
Closed

Improve type hints, add types to method params #140

crwilcox opened this issue Aug 4, 2020 · 4 comments · Fixed by #182
Assignees
Labels
api: firestore Issues related to the googleapis/python-firestore API. good first issue This issue is a good place to started contributing to this repository. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone

Comments

@crwilcox
Copy link
Contributor

crwilcox commented Aug 4, 2020

#134 adds type hints to the manual surface. That said, much of the merged types, maybe all, do not type params to functions. For instance:

    async def list_documents(
        self, page_size=None
    ) -> AsyncGenerator[AsyncDocumentReference, None]

page_size is an int. Adding these type hints would further assist users.

Work should target v2-staging branch for the time being.

@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Aug 4, 2020
@crwilcox crwilcox added good first issue This issue is a good place to started contributing to this repository. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Aug 4, 2020
@Yogendra0Sharma
Copy link

@crwilcox can i work on this issue?

@crwilcox
Copy link
Contributor Author

crwilcox commented Aug 5, 2020

@Yogendra0Sharma feel free to submit a PR!

@crwilcox crwilcox added this to the v2 milestone Aug 6, 2020
@Yogendra0Sharma
Copy link

@crwilcox do we have to use type hint for all function parameters?

@crwilcox
Copy link
Contributor Author

crwilcox commented Aug 7, 2020

If you can contribute a portion that is fine. Do you have an idea of places you think more type hints would be helpful for your use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. good first issue This issue is a good place to started contributing to this repository. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants