Open JarnoRFB opened 3 years ago
Thanks!
The same would be needed for our mypy
plugin.
Also, what about __new__
method?
Also, what about new method?
Not exactly sure what you mean, but as far as I understood it, the problem is that by default __new__
get's picked up by Signature.from_callable
.
Bug report
I tried out returns, because I was looking for typesafe curry implementation, but I hit a problem with my Generic / Protocol implementing attrs classes.
What's wrong
How is that should be
The above code should simply print
Pair(_a=2, _b=1)
This seems to be due to https://github.com/python-attrs/attrs/issues/374
A fix I hacked together could be something like this.
If you are interested in support this admittedly special use case, I could submit a PR.
System information
python
version: 3.7returns
version: 0.17.0mypy
version: 0.910