Skip to content
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

gh-91162: Fix most generic type substitution test cases #92427

Closed
wants to merge 1 commit into from

Conversation

mrahtz
Copy link
Contributor

@mrahtz mrahtz commented May 7, 2022

@serhiy-storchaka Darn, I'd just finished this when I realised you'd also been working on the same thing in main...serhiy-storchaka:typing-subst-unpacked. I think the version in my branch uses more helper functions in a way that improves readability, but your version does things in a way that's more consistent with the new design of typing.py - and of course fixes a lot of the C stuff that my branch doesn't touch. How do you want to proceed here?

Quick summary of what's in this PR:

  • Forbid the use of unpacked arguments unless the generic alias can take an arbitrary number of type parameters (as determined by checking for a TypeVarTuple in the parameter list)
  • Unpack finite-length tuples in argument lists

@mrahtz
Copy link
Contributor Author

mrahtz commented May 7, 2022

Oh, whoops, I see Serhiy's work already has a PR at #92335. Amazing! I'll close this PR for now and comment there instead.

@mrahtz mrahtz closed this May 7, 2022
@mrahtz mrahtz deleted the subst-fixes-2 branch May 8, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants