Skip to content

Commit 0616c83

Browse files
[3.12] gh-106145: Make end_{lineno,col_offset} required on type_param nodes (GH-106224) (#106295)
gh-106145: Make `end_{lineno,col_offset}` required on `type_param` nodes (GH-106224) (cherry picked from commit 46c1097) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent d6a5a30 commit 0616c83

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

Lib/test/test_unparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ class DirectoryTestCase(ASTTestCase):
705705
test_directories = (lib_dir, lib_dir / "test")
706706
run_always_files = {"test_grammar.py", "test_syntax.py", "test_compile.py",
707707
"test_ast.py", "test_asdl_parser.py", "test_fstring.py",
708-
"test_patma.py"}
708+
"test_patma.py", "test_type_alias.py", "test_type_params.py"}
709709

710710
_files_to_test = None
711711

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Make ``end_lineno`` and ``end_col_offset`` required on ``type_param`` ast
2+
nodes.

Parser/Python.asdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,5 @@ module Python
148148
type_param = TypeVar(identifier name, expr? bound)
149149
| ParamSpec(identifier name)
150150
| TypeVarTuple(identifier name)
151-
attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
151+
attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
152152
}

Python/Python-ast.c

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)