-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
- Search the issues already opened: https://github.com/googleapis/python-datacatalog/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python
If you are still having issues, please be sure to include as much information as possible:
Environment details
- OS type and version: macOS/debian
- Python version:
python --version3.9.1 - pip version:
pip --version21.0.1 google-cloud-datacatalogversion:pip show google-cloud-datacatalog3.2.0- mypy version: 0.812
Steps to reproduce
- use
DataCatlogClient#list_tagsin for-loop - check that code using mypy
Code example
from google.cloud import datacatalog
dcclient = datacatalog.DataCatalogClient()
for tag in dcclient.list_tags(parent="dummy"):
print(tag)Error
$ mypy snippet.py
snippet.py:4:12: error: "Iterable[Tag]" has no attribute "__next__"
Found 1 error in 1 file (checked 1 source file)
I suspect this is due to the return type of ListTagsPager#__iter__ is annotated as Iterable rather than Iterator, but not sure (according to the Python protocol, Iterable only offers __iter__ method, while Iterator offers __next__).
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.