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

feat: Support PEP 695 TypeVars syntax for the stubs generator. #68

Open
Masara opened this issue Feb 25, 2024 · 0 comments
Open

feat: Support PEP 695 TypeVars syntax for the stubs generator. #68

Masara opened this issue Feb 25, 2024 · 0 comments
Labels
enhancement 💡 New feature or request
Milestone

Comments

@Masara
Copy link
Contributor

Masara commented Feb 25, 2024

Is your feature request related to a problem?

Currently the PEP 695 TypeVars syntax is not supported for the stubs generator.

Desired solution

The code

def  func[T](a: T, b: T) -> T: ...

should produce the following stubs:

@Pure
fun func<T>(a: T) -> result1: T

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

See the comments here. I already added the stubs generation for these TypeVars, see commit 9c30988. Mypy currently does not support the PEP 695 syntax natively, which poses the problem that Python 3.11 does not support the snapshot tests.

@Masara Masara added the enhancement 💡 New feature or request label Feb 25, 2024
@Masara Masara removed their assignment Apr 5, 2024
@lars-reimann lars-reimann added this to the Future milestone May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants