Unlike AST nodes for 3.10 match syntax, AST nodes for 3.12 type param syntax (PEP 695) do not require end_lineno nor end_col_offset.
For 3.10 match syntax, this question was discussed here, and it was decided to require them.
Context: see end_lineno and end_col_offset creation in 3.8 by #11605.
cpython/Parser/Python.asdl
Lines 148 to 151 in bb578a0
Python 3.12.0b3
cc @JelleZijlstra
Good catch, I think we should fix this. Feel free to submit a PR; otherwise I should get to it in the next few days.
pythongh-106145: Make `end_{lineno,col_offset}` required on `type_par…
Sorry for sliding in, but I was experimenting with type_params support for my linter and found this related issue :)
gh-106145: Make `end_{lineno,col_offset}` required on `type_param` no…
[3.12] gh-106145: Make `end_{lineno,col_offset}` required on `type_pa…
Fixed in #106224. Thanks all!
Update type annotations of PEP 695 nodes
Update type annotations of PEP 695 nodes (#2264)
Update type annotations of PEP 695 nodes (pylint-dev#2264)
Exclude unassigned type-annotated class attributes from enum __member…
pythongh-136640: state the end-position rule and test it
Activity
Eclips4 commented on Jun 27, 2023
cc @JelleZijlstra
JelleZijlstra commented on Jun 27, 2023
Good catch, I think we should fix this. Feel free to submit a PR; otherwise I should get to it in the next few days.
pythongh-106145: Make `end_{lineno,col_offset}` required on `type_par…
sobolevn commented on Jun 29, 2023
Sorry for sliding in, but I was experimenting with type_params support for my linter and found this related issue :)
gh-106145: Make `end_{lineno,col_offset}` required on `type_param` no…
pythongh-106145: Make `end_{lineno,col_offset}` required on `type_par…
[3.12] gh-106145: Make `end_{lineno,col_offset}` required on `type_pa…
jacobtylerwalls commented on Jul 1, 2023
Fixed in #106224. Thanks all!
pythongh-106145: Make `end_{lineno,col_offset}` required on `type_par…
Update type annotations of PEP 695 nodes
Update type annotations of PEP 695 nodes (#2264)
Update type annotations of PEP 695 nodes (pylint-dev#2264)
Exclude unassigned type-annotated class attributes from enum __member…
pythongh-136640: state the end-position rule and test it