This is an automated email from the ASF dual-hosted git repository. tvalentyn pushed a commit to branch tvalentyn-patch-9 in repository https://gitbox.apache.org/repos/asf/beam.git
commit 646a6e3dc6906c3ec328f47641a73f327d9bf57f Author: tvalentyn <[email protected]> AuthorDate: Fri Dec 19 11:42:18 2025 -0800 Update periodicsequence.py Change `return` to `break` to avoid the warning that a DoFn mixes 'return' and 'yield' in the same method. --- sdks/python/apache_beam/transforms/periodicsequence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/transforms/periodicsequence.py b/sdks/python/apache_beam/transforms/periodicsequence.py index 82b6fd0330c..3a13e0a2d6a 100644 --- a/sdks/python/apache_beam/transforms/periodicsequence.py +++ b/sdks/python/apache_beam/transforms/periodicsequence.py @@ -169,11 +169,11 @@ class ImpulseSeqGenDoFn(beam.DoFn): # we are too ahead of time, let's wait. restriction_tracker.defer_remainder( timestamp.Timestamp(current_output_timestamp)) - return + break if not restriction_tracker.try_claim(current_output_index): # nothing to claim, just stop - return + break output = self._get_output(current_output_index, current_output_timestamp)
