forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force-enable strict optional only when checking for unsafe overlaps
Resolves python#5246 Previously, we force-enabled strict optional checks when performing all overload definition checks. This ended up causing mypy to miss some errors in definitions when `--no-strict-optional` mode is enabled. This commit will now force-enable strict optional only when checking if overloads are unsafely overlapping: we use the existing mode when checking if one variant completely eclipses another or when checking the implementation.
- Loading branch information
1 parent
0f3f09a
commit 9c7687b
Showing
2 changed files
with
119 additions
and
74 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