Replies: 1 comment 1 reply
-
The original method has a parameter def func(self, /, y: int, **kwargs: Any) -> None:
... The error message is far from clear, so I'll file a bug to improve that. I'll also think about whether this could be special-cased because others are likely to hit this issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With v1.1.206, the example below now triggers an incompatibleOverride error. I guess something that was hidden before #2838. I'm not sure what the best course of action here should be. Just by definition of PEP 612 the error is correct.
self
inwrapper
is defined aspositional-only
. In practice however it would be unnecessary cumbersome to have to add/
after anyself
. I might have mentioned it already elsewhere, but this is also something that's causing us headaches at the mypy side. python/mypy#11847Any ideas how to best resolve this?
The fallback would probably be to use
cast
. The downside being that the decorator could now be used everywhere sinceself
isn't checked anymore.Beta Was this translation helpful? Give feedback.
All reactions