-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mypy upgrade from 0.782 to 0.991 (#343)
Summary: <!-- Thank you for your interest in this project. Bugs filed and PRs submitted are appreciated! Please make sure that you are familiar with and follow the Code of Conduct of this project which can be found at https://github.com/facebook/TestSlide/blob/main/CODE_OF_CONDUCT.md Also, please make sure you're familiar with and follow the instructions in the contributing guidelines which can be found at https://github.com/facebook/TestSlide/blob/main/CONTRIBUTING.md --> **What:** mypy is currently pinned on an old version, and type checks are currently breaking the tests. **Why:** I saw a comment somewhere about avoiding type checker pain by upgrading, and decided to face the pain. A side-effect is that the type check that is currently broken around the arguments to `type()` got fixed just by upgrading. **How:** Review needed. In several cases I'm adding more ignores, because I cannot see a simple resolution. Fixed a lexer issue for Pygments by adding the extension in the Sphinx config file. **Risks:** Tests are passing. Biggest change is in the frame checking code in `mock_constructor.py` - if a caller frame can't be found, then the previous one can't be found, and the attempt to get frame info to set up the `_CallableMock` would probably fail? I can't see how this would happen in reality, but using type refinement made mypy happy. If someone can come up with a test case that would generate a None for the currentframe() call, I'll add it and test it. **Checklist**: - [ ] Added tests, if you've added code that should be tested (Unsure if needed) - [ ] Updated the documentation, if you've changed APIs N/A - [x] Ensured the test suite passes - [x] Made sure your code lints - [x] Completed the Contributor License Agreement ("CLA") Pull Request resolved: #343 Reviewed By: cricalix Differential Revision: D42067967 Pulled By: deathowl fbshipit-source-id: 8915a9172a1be440209a9d9ef3d693da12fe452e
- Loading branch information
1 parent
4316dad
commit 61b016b
Showing
10 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ coverage | |
coveralls | ||
flake8 | ||
isort~=5.1 | ||
mypy==0.782 | ||
mypy==0.991 | ||
ipython | ||
sphinx | ||
sphinx-autobuild | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters