-
Notifications
You must be signed in to change notification settings - Fork 112
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
Mypy fails with nested matchers #207
Comments
This is a minimal example on mypy-play: https://mypy-play.net/?mypy=latest&python=3.10&gist=4c8824df5632e2358e459fd80cb42388 |
offbyone
added a commit
to offbyone/PyHamcrest
that referenced
this issue
Aug 6, 2022
fixes hamcrest#207 `Matcher[object]` is too tight of a bound on the output type; what we're asserting is that a matcher for `Any` type is what `has_properties` will do
offbyone
added a commit
to offbyone/PyHamcrest
that referenced
this issue
Aug 6, 2022
fixes hamcrest#207 `Matcher[object]` is too tight of a bound on the output type; what we're asserting is that a matcher for `Any` type is what `has_properties` will do
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the example below I have used
has_items
andhas_properties
however I am seeing this withcontains
and friends andhas_entries
as well.Minimal reproducable example
Packages
Example
Expected outcome
mypy does not complain as this is a valid use of
has_items
andhas_properties
.Actual outcome
mypy returns the following error
The text was updated successfully, but these errors were encountered: