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

3.12: add support for type params and type statements #778

Merged
merged 1 commit into from
Jun 29, 2023
Merged

Conversation

asottile
Copy link
Member

No description provided.

@asottile asottile force-pushed the pep-695 branch 4 times, most recently from 6440202 to 61ba56c Compare June 25, 2023 19:15
@asottile asottile merged commit afe2c4d into main Jun 29, 2023
@asottile asottile deleted the pep-695 branch June 29, 2023 00:18
zanieb added a commit to astral-sh/ruff that referenced this pull request Jul 28, 2023
Requires astral-sh/RustPython-Parser#42
Related PyCQA/pyflakes#778
[PEP-695](https://peps.python.org/pep-0695)
Part of #5062 

<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
Adds a scope for type parameters, a type parameter binding kind, and
checker visitation of type parameters in type alias statements, function
definitions, and class definitions.

A few changes were necessary to ensure correctness following the
insertion of a new scope between function and class scopes and their
parent.

## Test Plan

<!-- How was it tested? -->
Undefined name snapshots.

Unused type parameter rule will be added as follow-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant