Skip to content

Commit

Permalink
Fix a bug in _get_function_body_without_inners for module sdks.python…
Browse files Browse the repository at this point in the history
….transforms.core (#32591)
  • Loading branch information
DKER2 authored Oct 1, 2024
1 parent deb4b4a commit aadb695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/transforms/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ def partition_for(self, element, num_partitions, *args, **kwargs):

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] \
Expand Down

0 comments on commit aadb695

Please sign in to comment.