-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add return type for tests #7327
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
- Adds return type for tests as None. - Looking at quantumlib#4393, it occured we could automate a bunch of these errors with a simple script by adding "-> None" to tests. - At first, I thought this was ridiculous, but actually, this enables mypy to check the tests for typing errors, of which there are many. - These are the files that can be automatically changed that do not having typing errors. - The only changes are adding "-> None" to the test functions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7327 +/- ##
==========================================
- Coverage 98.67% 98.67% -0.01%
==========================================
Files 1111 1111
Lines 96811 96811
==========================================
- Hits 95528 95524 -4
- Misses 1283 1287 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look through every file: It is a lot of tests 😅, but if a script did this then I believe it's fine.
Do we want to add this commit to https://github.com/quantumlib/Cirq/blob/main/.git-blame-ignore-revs? |
Follow up to quantumlib#7327, related to quantumlib#4393.
--disallow-untyped-defs
flag to mypy. #4393, it occured we could automate a bunch of these errors with a simple script by adding "-> None" to tests.