Alex Waygood
Alex Waygood
FWIW, while mypy and pyright are okay with this, pyrefly also rejects this code. If we add a call to our helper function `reveal_protocol_interface` here, it's easy to see what's...
> Your version also makes an assumption that the `Inner` attribute itself is not intended to be part of the protocol, but it may be that the user intent of...
Treating PEP-613 aliases as first-class opaque types and just referring to them with the alias names (rather than eagerly expanding the values of the aliases) would probably help a lot...
Thanks for the report! We don't support `Concatenate` yet; I've added this as a child issue of #1535.
Thanks for the report. I haven't looked too closely but our type inference for lambdas at the moment is currently very limited (see https://github.com/astral-sh/ty/issues/181). The trouble is that most of...
I believe it's only defined on pure-Python classes, which isn't expressible in the type system. Probably the only safe way of accessing this attribute is by doing something like `getattr(obj,...
Perhaps we could put these examples in expandable sections that are hidden by default, like we recently did for the "relevant PEPs" section of the typing docs: https://docs.python.org/3.12/library/typing.html#relevant-peps.
> Do you mean something like this? yes
To implement this, we would need to represent PEP-613 aliases as first-class opaque types in our model, similar to what we do with PEP-695 aliases. (That's definitely something we could...
Possibly `has_relation_to` could return `Result`: - If the first type is a subtype of (or assignable to) the second type, `Ok(())` is returned - If the first type doesn't have...