-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic ParamSpec Concatenate and literal support #11847
Commits on Dec 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ef32680 - Browse repository at this point
Copy the full SHA ef32680View commit details
Commits on Dec 25, 2021
-
Improve ParamSpec and Parameters checking
Now this program works: ```py from typing_extensions import ParamSpec from typing import Generic, Callable P = ParamSpec("P") class Z(Generic[P]): def call(self, *args: P.args, **kwargs: P.kwargs) -> None: pass n: Z[[int]] reveal_type(n) # N: Revealed type is "repro.Z[[builtins.int]]" def f(n: Z[P]) -> Z[P]: ... reveal_type(f) # N: Revealed type is "def [P] (n: repro.Z[P`-1]) -> repro.Z[P`-1]" reveal_type(f(n)) # N: Revealed type is "repro.Z[[builtins.int]]" ```
Configuration menu - View commit details
-
Copy full SHA for 816f3cd - Browse repository at this point
Copy the full SHA 816f3cdView commit details
Commits on Dec 26, 2021
-
Get basic Concatenate features working
This program: ```py from typing_extensions import ParamSpec, Concatenate from typing import Generic P = ParamSpec("P") class Z(Generic[P]): ... n: Z[[int]] reveal_type(n) def f(n: Z[P]) -> Z[Concatenate[bool, Concatenate[str, P]]]: ... reveal_type(f) reveal_type(f(n)) ``` outputs: ``` repro.py:10: note: Revealed type is "repro.Z[[builtins.int]]" repro.py:14: note: Revealed type is "def [P] (n: repro.Z[P`-1]) -> repro.Z[Concatenate[builtins.bool, builtins.str, P`-1]]" repro.py:15: note: Revealed type is "repro.Z[[builtins.bool, builtins.str, builtins.int]]" ``` Next up: checking inputs match prefixes and why does it only work when cache exists?
Configuration menu - View commit details
-
Copy full SHA for d9b352f - Browse repository at this point
Copy the full SHA d9b352fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58e6dbe - Browse repository at this point
Copy the full SHA 58e6dbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51ba4ea - Browse repository at this point
Copy the full SHA 51ba4eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24432ee - Browse repository at this point
Copy the full SHA 24432eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for c507152 - Browse repository at this point
Copy the full SHA c507152View commit details -
Configuration menu - View commit details
-
Copy full SHA for d202d1e - Browse repository at this point
Copy the full SHA d202d1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ed9830 - Browse repository at this point
Copy the full SHA 9ed9830View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ffc343 - Browse repository at this point
Copy the full SHA 3ffc343View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae8ac73 - Browse repository at this point
Copy the full SHA ae8ac73View commit details
Commits on Dec 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9c849cc - Browse repository at this point
Copy the full SHA 9c849ccView commit details
Commits on Dec 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d9dcc76 - Browse repository at this point
Copy the full SHA d9dcc76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e2b207 - Browse repository at this point
Copy the full SHA 0e2b207View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd445e5 - Browse repository at this point
Copy the full SHA bd445e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 604c304 - Browse repository at this point
Copy the full SHA 604c304View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8004ec - Browse repository at this point
Copy the full SHA f8004ecView commit details
Commits on Dec 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9e75481 - Browse repository at this point
Copy the full SHA 9e75481View commit details
Commits on Jan 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7b89f06 - Browse repository at this point
Copy the full SHA 7b89f06View commit details -
Configuration menu - View commit details
-
Copy full SHA for f24cf4f - Browse repository at this point
Copy the full SHA f24cf4fView commit details
Commits on Jan 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 472b20c - Browse repository at this point
Copy the full SHA 472b20cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14ecfb9 - Browse repository at this point
Copy the full SHA 14ecfb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e0ae49 - Browse repository at this point
Copy the full SHA 5e0ae49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45c8057 - Browse repository at this point
Copy the full SHA 45c8057View commit details
Commits on Jan 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 10966ea - Browse repository at this point
Copy the full SHA 10966eaView commit details
Commits on Jan 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c46feec - Browse repository at this point
Copy the full SHA c46feecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a9cd71 - Browse repository at this point
Copy the full SHA 6a9cd71View commit details -
Configuration menu - View commit details
-
Copy full SHA for afc1a57 - Browse repository at this point
Copy the full SHA afc1a57View commit details
Commits on Jan 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 41e38b2 - Browse repository at this point
Copy the full SHA 41e38b2View commit details
Commits on Jan 27, 2022
-
Fix something I assumed incorrectly
I ran into this while testing an interface with ParamSpec :(
Configuration menu - View commit details
-
Copy full SHA for 86e23c2 - Browse repository at this point
Copy the full SHA 86e23c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f4cf5c - Browse repository at this point
Copy the full SHA 3f4cf5cView commit details
Commits on Jan 29, 2022
-
This reverts commit c46feec. This commit caused bugs for some reason....
Configuration menu - View commit details
-
Copy full SHA for 61b00cd - Browse repository at this point
Copy the full SHA 61b00cdView commit details
Commits on Mar 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9c2cefd - Browse repository at this point
Copy the full SHA 9c2cefdView commit details -
Main things left: - Concatenate with mypy_extensions args - Flag for non-strict Concatenate
Configuration menu - View commit details
-
Copy full SHA for a44937b - Browse repository at this point
Copy the full SHA a44937bView commit details -
Configuration menu - View commit details
-
Copy full SHA for bbabbf1 - Browse repository at this point
Copy the full SHA bbabbf1View commit details
Commits on Mar 5, 2022
-
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for ddfd34a - Browse repository at this point
Copy the full SHA ddfd34aView commit details -
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2d54ac4 - Browse repository at this point
Copy the full SHA 2d54ac4View commit details -
Configuration menu - View commit details
-
Copy full SHA for bba91e5 - Browse repository at this point
Copy the full SHA bba91e5View commit details
Commits on Mar 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e0a7663 - Browse repository at this point
Copy the full SHA e0a7663View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0363803 - Browse repository at this point
Copy the full SHA 0363803View commit details -
Configuration menu - View commit details
-
Copy full SHA for 278b8c4 - Browse repository at this point
Copy the full SHA 278b8c4View commit details -
This is required to allow positional arguments to be replaced with named arguments.
Configuration menu - View commit details
-
Copy full SHA for c2b7628 - Browse repository at this point
Copy the full SHA c2b7628View commit details
Commits on Mar 10, 2022
-
Apply suggestions from code review
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0b1fdfb - Browse repository at this point
Copy the full SHA 0b1fdfbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fff609 - Browse repository at this point
Copy the full SHA 0fff609View commit details
Commits on Mar 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4475515 - Browse repository at this point
Copy the full SHA 4475515View commit details
Commits on Mar 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0091762 - Browse repository at this point
Copy the full SHA 0091762View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81994f1 - Browse repository at this point
Copy the full SHA 81994f1View commit details
Commits on Apr 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1ff96c1 - Browse repository at this point
Copy the full SHA 1ff96c1View commit details -
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for c79918e - Browse repository at this point
Copy the full SHA c79918eView commit details -
Copy pyright's representation of Concatenate
pros: - more readable IMO - more concise - standardization of output cons: - can be easy to miss double backets - I feel like this is a small deviation from normal mypy representations... but I have nothing to back that up. Overall, I think it's a good thing to try at least.
Configuration menu - View commit details
-
Copy full SHA for 9b1fc75 - Browse repository at this point
Copy the full SHA 9b1fc75View commit details