Skip to content

Commit

Permalink
add strip
Browse files Browse the repository at this point in the history
  • Loading branch information
DKER2 committed Sep 29, 2024
1 parent e705e28 commit 5df2a57
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 5df2a57

Please sign in to comment.