liferoad commented on code in PR #25743:
URL: https://github.com/apache/beam/pull/25743#discussion_r1132911272


##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -1387,6 +1388,47 @@ def partition_for(self, element, num_partitions, *args, 
**kwargs):
     return self._fn(element, num_partitions, *args, **kwargs)
 
 
+def _get_function_body_without_inners(func):
+  source_lines = inspect.getsourcelines(func)[0]

Review Comment:
   By checking the lines, we can capture these cases now. I also updated the 
tests. To be safe, I changed to use the logging warning instead of raising 
RuntimeError. The doc was updated by https://github.com/apache/beam/pull/25060. 
I also updated the warning messages with the actionable suggestions.



-- 
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]

Reply via email to