Skip to content

Commit 646a6e3

Browse files
authored
Update periodicsequence.py
Change `return` to `break` to avoid the warning that a DoFn mixes 'return' and 'yield' in the same method.
1 parent 423a3c3 commit 646a6e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdks/python/apache_beam/transforms/periodicsequence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ def process(
169169
# we are too ahead of time, let's wait.
170170
restriction_tracker.defer_remainder(
171171
timestamp.Timestamp(current_output_timestamp))
172-
return
172+
break
173173

174174
if not restriction_tracker.try_claim(current_output_index):
175175
# nothing to claim, just stop
176-
return
176+
break
177177

178178
output = self._get_output(current_output_index, current_output_timestamp)
179179

0 commit comments

Comments
 (0)