Carl Meyer
Carl Meyer
In general, this means that methods decorated with a decorator returning a `Callable` type will not work (they won't bind as methods). This also causes problems with SymPy, which decorates...
A user gave this use case in Discord: https://gist.github.com/ryanhiebert/7751ad1efac64f735ec231b2ce5b6cc6 It doesn't appear to be covered by the fix here? I suspect we may need to follow other type checkers here...
It seems like there is a case in `discord.py` (with an `on_error` attribute that is assigned dynamically from a callable type) that comes up in #21139 that looks like it...
I filed https://github.com/astral-sh/ty/issues/1495 for the somewhat-separate issue of modeling all `FunctionType` attributes existing on all `Callable` types.
Thanks for the report! Looks like a bug. Removing the `get_inner()` methods does not fix the error, so the issue is not with the use of the nested protocols, it's...
I also think the mypy/pyright interpretation (which I roughly guess to be that a nested protocol class in a protocol is effectively the same as `Inner: ClassVar[type[GloballyDefinedInner]]` as an attribute...
Thanks for the report! It looks like `_MiddlewareFactory` is a protocol which is generic over a `ParamSpec`, so I think we should revisit this once #157 is done.
Putting this in beta milestone as I think we should ensure it's either fixed or suppressed in some way for the beta.
Didn't get this into the beta, but it's a high priority follow-up.
Right: the suggestion in point 1 is that we should; where augmented assignment is merely one form of syntactic sugar for an implicit dunder call, where we could propagate type...