-
Notifications
You must be signed in to change notification settings - Fork 575
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pinned dependencies #3019
Conversation
1706ebe
to
db817d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly needs some upstream patches before I'll be happy merging this.
@@ -103,7 +103,7 @@ class HypothesisFixComplexMinMagnitude(VisitorBasedCodemodCommand): | |||
METADATA_DEPENDENCIES = (cst.metadata.QualifiedNameProvider,) | |||
|
|||
@m.call_if_inside( | |||
m.Call(metadata=match_qualname("hypothesis.strategies.complex_numbers")) | |||
m.Call(metadata=match_qualname("hypothesis.strategies.complex_numbers")) # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a mypy bug, confusing m.Call
with builtins.Call
(which does't accept a metadata=
kwarg).
hypothesis/extra/codemods.py:106: error: Unexpected keyword argument "metadata" for "Call"
...python3.8/site-packages/mypy/typeshed/stdlib/builtins.pyi:95: note: "Call" defined here
I think python/mypy#10617 is the same underlying bug.
@@ -28,7 +28,7 @@ | |||
import datetime as dt | |||
|
|||
import pytz | |||
from pytz.tzfile import StaticTzInfo | |||
from pytz.tzinfo import StaticTzInfo # type: ignore # incomplete stubs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear if this is meant to be public or not, but it's missing from the typeshed stubs and installing them complains with the same error. At minimum, mypy should not recommend installing stubs which are already installed! See also python/mypy#10645
ccce896
to
db817d2
Compare
db817d2
to
065b89b
Compare
I've closed this PR since the main change is to update
mypy
, and I'd rather do that after some fixes for new bugs are released in the upcoming 0.910 version. When that's available, see master...Zac-HD:mypy-0.910 for the expected changes.The long-awaited part is improved inference for unions of covariant generics -
one_of(...)
should then inferSearchStrategy[... | ...]
with the correct union of element types automatically, sinceEx
is a covariant typevar. See #1270 (comment) and the linked issues, plus python/mypy#9994 for the fix 馃榿If other typecheckers (e.g. pyright, pyre, pytype) don't handle this, we might want to (a) restore the overloads as a mitigation, and (b) add them to our CI so that we can detect future breakage for those users.