Matthew Rahtz
Matthew Rahtz
If a `TypeVar` is defined with a `bound` argument, but the `TypeVar` is in a different module to the one being checked, the `bound` seems to be ignored. For example:...
# Pyre Bug PEP 646 specifies that the following behaviour should be valid: ```python T = TypeVar('T') Ts = TypeVarTuple('Ts') class C(Generic[T, *Ts]): pass C[*tuple[int, ...]] ``` I think Pyre...
The following example... ```python3 from typing import Callable from pyre_extensions import TypeVarTuple, Unpack Ts = TypeVarTuple('Ts') def foo(func: Callable[[Unpack[Ts]], None]): pass def bar(*args: int): pass foo(bar) ``` ...should type-check correctly;...
This PR fixes the last few things from the PEP 646 implementation checklist at https://github.com/python/cpython/issues/87390#issuecomment-1104419757. Specifically: * Fix a weird hack we used for star-unpacking in `test_genericalias.py` before the star-unpacking...
Thanks for the great paper! The 'The State-of-the-art Dimensionality Reduction is Non-linear' section currently renders with 'emdash'es directly visible. I've tested in both Chrome and Safari so I'm fairly sure...
Hi all! Here's an example of a simple `Protocol` being used to detect that we're passing a function with the wrong arguments: ```python from typing import Protocol class FuncTemplate(Protocol): def...
There are two aims here: 1. Make `*args: *Ts` valid. 2. Make starred expression valid in the context of `subscription`, such that `Generic[*a]` and `list[*a]` are valid. 1 is straightforward,...