claudevdm commented on code in PR #40501:
URL: https://github.com/apache/beam/pull/40501#discussion_r4413527694
##########
sdks/python/apache_beam/typehints/typecheck.py:
##########
@@ -84,25 +84,67 @@ def teardown(self):
return self.dofn.teardown()
-class OutputCheckWrapperDoFn(AbstractDoFnWrapper):
- """A DoFn that verifies against common errors in the output type."""
- def __init__(self, dofn, full_label):
+class RuntimeTypeCheckWrapperDoFn(AbstractDoFnWrapper):
+ """A wrapper around a DoFn which performs type-checking of input and
output."""
+ def __init__(self, dofn, type_hints, full_label):
super().__init__(dofn)
self.full_label = full_label
+ process_fn = self.dofn._process_argspec_fn()
+ if hasattr(process_fn, '__func__'):
Review Comment:
This block (94-99) binds arguments differently from master: it passes the
DoFn where master passed the method's own object. Not sure of all the cases
this affects, but for example it differs for beam.Map(obj.method) with a method
whose first parameter is *args
--
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]