mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 07:04:28 -05:00
[syntax-errors] Type parameter defaults before Python 3.13 (#16447)
Summary -- Detects the presence of a [PEP 696] type parameter default before Python 3.13. Test Plan -- New inline parser tests for type aliases, generic functions and generic classes. [PEP 696]: https://peps.python.org/pep-0696/#grammar-changes
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# parse_options: {"target-version": "3.12"}
|
||||
type X[T = int] = int
|
||||
def f[T = int](): ...
|
||||
class C[T = int](): ...
|
||||
class D[S, T = int, U = uint](): ...
|
||||
Reference in New Issue
Block a user