-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address errors found by mypy.stubtype
These errors fell into one of the following categories - Stubs that existed in the .pyi file that had no corresponding function in the .py file (likely becuase functionality was removed but the stub was not updated) - The annotation in the .pyi file did not match the annotation in the .py file - The .pyi file simply had no entry for a function in the .py file - Annotations existed, but they were in the .py file and not the .pyi file The last category is the most interesting. The behavior of mypy is to prioritize the .pyi file if it exists, which means that if there is a .pyi file any annotations in the .py file are ignored by mypy. This behavior was surprising, since the expectation is that the annotations would be the union of the .pyi and .py file, but instead if pulls from only the .pyi file (likely to avoid conflicts if annotations mismatch). Going forward, hopefully the presence of the mypy.stubtype check will ensure that new code adds annotations to the .pyi file instead of in the .py file.
- Loading branch information
1 parent
c32588c
commit 466a031
Showing
5 changed files
with
247 additions
and
99 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
Oops, something went wrong.