This is an automated email from the ASF dual-hosted git repository. tvalentyn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new aadb695348d Fix a bug in _get_function_body_without_inners for module sdks.python.transforms.core (#32591) aadb695348d is described below commit aadb695348de77f4791b7b0f947552ffc6bff02f Author: DKPHUONG <82434977+dk...@users.noreply.github.com> AuthorDate: Tue Oct 1 07:12:54 2024 +0700 Fix a bug in _get_function_body_without_inners for module sdks.python.transforms.core (#32591) --- sdks/python/apache_beam/transforms/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/transforms/core.py b/sdks/python/apache_beam/transforms/core.py index c6560ee4357..e7180bc093b 100644 --- a/sdks/python/apache_beam/transforms/core.py +++ b/sdks/python/apache_beam/transforms/core.py @@ -1461,7 +1461,7 @@ class CallableWrapperPartitionFn(PartitionFn): def _get_function_body_without_inners(func): source_lines = inspect.getsourcelines(func)[0] - source_lines = dropwhile(lambda x: x.startswith("@"), source_lines) + source_lines = dropwhile(lambda x: x.strip().startswith("@"), source_lines) first_def_line = next(source_lines).strip() if first_def_line.startswith("def "): last_def_line_without_comment = first_def_line.split("#")[0] \