-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Two more issues with overloads and --no-strict-optional #5246
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
priority-1-normal
topic-overloads
topic-strict-optional
Comments
ilevkivskyi
added
bug
mypy got something wrong
topic-depends-on-strict-optional
priority-1-normal
false-positive
mypy gave an error on correct code
topic-overloads
labels
Jun 19, 2018
A temporary workaround would be to swap the order of the overloads so the one with I'll look into adding a more robust fix. |
Michael0x2a
added a commit
to Michael0x2a/typeshed
that referenced
this issue
Jun 20, 2018
…irst In short, this change makes sure calls like `map(None, a, b)` behave as expected when using `--no-strict-optional` is enabled. For additional context, see python/mypy#5246
Michael0x2a
added a commit
to Michael0x2a/mypy
that referenced
this issue
Jun 20, 2018
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.
JelleZijlstra
pushed a commit
to python/typeshed
that referenced
this issue
Jun 20, 2018
…irst (#2261) In short, this change makes sure calls like `map(None, a, b)` behave as expected when using `--no-strict-optional` is enabled. For additional context, see python/mypy#5246
Michael0x2a
added a commit
to Michael0x2a/mypy
that referenced
this issue
Jun 20, 2018
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.
ilevkivskyi
pushed a commit
that referenced
this issue
Jun 21, 2018
…5252) Resolves #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.
yedpodtrzitko
pushed a commit
to yedpodtrzitko/typeshed
that referenced
this issue
Jan 23, 2019
…irst (python#2261) In short, this change makes sure calls like `map(None, a, b)` behave as expected when using `--no-strict-optional` is enabled. For additional context, see python/mypy#5246
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
priority-1-normal
topic-overloads
topic-strict-optional
Here are some new false positives with overloads, based on real code samples with
map
in Python 2.The bug(s) only appear if the strict optional is disabled:
The text was updated successfully, but these errors were encountered: