You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/02/09 20:12:35 UTC

[GitHub] [beam] tvalentyn commented on a change in pull request #16791: [BEAM-12920] Assume that bare generator types define simple generators

tvalentyn commented on a change in pull request #16791:
URL: https://github.com/apache/beam/pull/16791#discussion_r803049762



##########
File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
##########
@@ -258,11 +258,11 @@ def convert_to_beam_type(typ):
     elif _match_is_union(typ):
       raise ValueError('Unsupported Union with no arguments.')
     elif _match_issubclass(typing.Generator)(typ):
-      raise ValueError('Unsupported Generator with no arguments.')
+      # Assume a simple generator.
+      args = [typehints.TypeVariable('T_co'), type(None), type(None)]

Review comment:
       fixed, thanks!




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org