-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
remove tests/__init__.py #7863
remove tests/__init__.py #7863
Conversation
I think there's some contention here between mypy and a preference to not have this file. Mypy refuses to allow configuration in a directory if the file is not present (because it only configures 'modules', even though it'll check the files which are not in modules...). python/mypy#10045 I'll merge this for now, but I may need to reintroduce the file as I complete the typing on tests in future PRs. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7863 +/- ##
==========================================
- Coverage 97.40% 97.40% -0.01%
==========================================
Files 106 107 +1
Lines 32164 32190 +26
Branches 3739 3740 +1
==========================================
+ Hits 31329 31354 +25
- Misses 631 632 +1
Partials 204 204
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@Dreamsorcerer pretty sure I was able to run mypy against tests w/ the implicit package mode. In general, putting init in the folder let's people do relative imports in the tests, but I don't think we should use this. |
The tests run, you just can't configure them in .mypy.ini (see the issue I linked). It doesn't look like any test-specific config got merged in yet, I'll see what happens when I resume adding typing to the remaining tests. |
Backport to 3.9: 💚 backport PR created✅ Backport PR branch: Backported as #7870 🤖 @patchback |
(cherry picked from commit 3a21134)
Backport to 3.10: 💚 backport PR created✅ Backport PR branch: Backported as #7871 🤖 @patchback |
(cherry picked from commit 3a21134)
**This is a backport of PR #7863 as merged into master (3a21134).** <!-- Thank you for your contribution! --> ## What do these changes do? fixes #7858 <!-- Please give a short brief about these changes. --> ## Are there changes in behavior for the user? <!-- Outline any notable behaviour for the end users. --> ## Related issue number #7858 <!-- Are there any issues opened that will be resolved by merging this change? --> ## Checklist - [ ] I think the code is well written - [ ] Unit tests for the changes exist - [ ] Documentation reflects the changes - [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` * The format is <Name> <Surname>. * Please keep alphabetical order, the file is sorted by names. - [ ] Add a new news fragment into the `CHANGES` folder * name it `<issue_id>.<type>` for example (588.bugfix) * if you don't have an `issue_id` change it to the pr id after creating the pr * ensure type is one of the following: * `.feature`: Signifying a new feature. * `.bugfix`: Signifying a bug fix. * `.doc`: Signifying a documentation improvement. * `.removal`: Signifying a deprecation or removal of public API. * `.misc`: A ticket has been closed, but it is not of interest to users. * Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files." Co-authored-by: Robert Schütz <[email protected]>
**This is a backport of PR #7863 as merged into master (3a21134).** Co-authored-by: Robert Schütz <[email protected]>
What do these changes do?
fixes #7858
Are there changes in behavior for the user?
Related issue number
#7858
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.