mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
[syntax-errors] Type parameter lists before Python 3.12 (#16479)
Summary -- Another simple one, just detect type parameter lists in functions and classes. Like pyright, we don't emit a second diagnostic for `type` alias statements, which were also introduced in 3.12. Test Plan -- Inline tests.
This commit is contained in:
parent
d94a78a134
commit
81bcdcebd3
10 changed files with 557 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
# parse_options: {"target-version": "3.12"}
|
||||
class Foo[S: (str, bytes), T: float, *Ts, **P]: ...
|
|
@ -0,0 +1,2 @@
|
|||
# parse_options: {"target-version": "3.12"}
|
||||
def foo[T](): ...
|
Loading…
Add table
Add a link
Reference in a new issue