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

samples: add type hints to all samples #264

Closed
anguillanneuf opened this issue Dec 21, 2020 · 2 comments · Fixed by #476
Closed

samples: add type hints to all samples #264

anguillanneuf opened this issue Dec 21, 2020 · 2 comments · Fixed by #476
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. samples Issues that are directly related to samples. type: docs Improvement to the documentation for an API.

Comments

@anguillanneuf
Copy link
Contributor

anguillanneuf commented Dec 21, 2020

Add type hints so setting "enforce_type_hints" to True won't cause lint failures.

# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,

@anguillanneuf anguillanneuf self-assigned this Dec 21, 2020
@product-auto-label product-auto-label bot added api: pubsub Issues related to the googleapis/python-pubsub API. samples Issues that are directly related to samples. labels Dec 21, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 22, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Dec 26, 2020
@meredithslota meredithslota added type: docs Improvement to the documentation for an API. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Dec 28, 2020
@plamut
Copy link
Contributor

plamut commented Jul 8, 2021

@anguillanneuf What's the status of this, have you started working on type hints yet?

If not, I can probably handle this, I'll have some spare cycles.

@anguillanneuf
Copy link
Contributor Author

@plamut Thanks for the ping. If you can handle it, I will review. Thanks again!

@plamut plamut assigned plamut and unassigned anguillanneuf Jul 9, 2021
gcf-merge-on-green bot pushed a commit that referenced this issue Aug 25, 2021
Closes #264.

And here they are, annotated samples.

We should follow up with a `pytype` CI check, I'll open a separate issue for that.

**PR checklist:**
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-pubsub/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. samples Issues that are directly related to samples. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants