-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Warn when DoFn.process uses both yield and return #25743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@tvalentyn PTAL. |
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Assigning reviewers. If you would like to opt out of this review, comment R: @pabloem for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Codecov Report
@@ Coverage Diff @@
## master #25743 +/- ##
==========================================
- Coverage 71.44% 71.42% -0.03%
==========================================
Files 777 777
Lines 102275 102395 +120
==========================================
+ Hits 73075 73140 +65
- Misses 27745 27800 +55
Partials 1455 1455
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 17 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Run PythonDocker PreCommit |
|
Just noticed that the dofn used by
|
|
I think it is harmless since we are not returning anything, but #37153 should remove the warning. |
|
Found another one:) beam/sdks/python/apache_beam/io/fileio.py Line 233 in ca27526
This looks like harmless as the previous one. Maybe it is better to only give a warning if yield and return in the same function AND some of the returns are returning something? |
addresses #22969:
Do not allow mixing yield and return statements in the process method for DoFn
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.