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 2020/04/18 00:42:54 UTC

[GitHub] [beam] aaltay commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

aaltay commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn
URL: https://github.com/apache/beam/pull/9907#discussion_r410526255
 
 

 ##########
 File path: sdks/python/apache_beam/typehints/typed_pipeline_test.py
 ##########
 @@ -211,6 +211,31 @@ def process(self, element):
     assert_that(res_odd, equal_to([1, 3]), label='odd_check')
     p.run()
 
+  def test_typed_ptransform_fn_pre_hints(self):
+    # Test that type hints are propagated to the created PTransform.
+    # Decorator appears before type hints. This is the more common style.
+    @beam.ptransform_fn
+    @typehints.with_input_types(int)
 
 Review comment:
   Example above reads slightly differently. It is:
   
       @ptransform_fn
       @beam.typehints.with_input_types(..)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services