Skip to content

Commit 46c1097

Browse files
authored
gh-106145: Make end_{lineno,col_offset} required on type_param nodes (#106224)
1 parent 904aef9 commit 46c1097

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

Lib/test/test_unparse.py

+1-1
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

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

+1-1
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

+6-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)