robertwb commented on code in PR #35164:
URL: https://github.com/apache/beam/pull/35164#discussion_r2131440710
##########
sdks/python/apache_beam/typehints/typehints.py:
##########
@@ -1563,6 +1563,8 @@ def get_yielded_type(type_hint):
Raises:
ValueError if not iterable.
"""
+ if isinstance(type_hint, TypeVariable):
+ raise ValueError('%s is not iterable' % type_hint)
Review Comment:
+1
The type checker won't error out on (possibly) incorrect code; basically it
says "if this code runs, this is the type (as far as I can assert) it will
produce."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]