Skip to content

Commit

Permalink
[3.12] gh-106145: Make end_{lineno,col_offset} required on `type_pa…
Browse files Browse the repository at this point in the history
…ram` 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>
  • Loading branch information
miss-islington and sobolevn committed Jul 1, 2023
1 parent d6a5a30 commit 0616c83
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_unparse.py
Expand Up @@ -705,7 +705,7 @@ class DirectoryTestCase(ASTTestCase):
test_directories = (lib_dir, lib_dir / "test")
run_always_files = {"test_grammar.py", "test_syntax.py", "test_compile.py",
"test_ast.py", "test_asdl_parser.py", "test_fstring.py",
"test_patma.py"}
"test_patma.py", "test_type_alias.py", "test_type_params.py"}

_files_to_test = None

Expand Down
@@ -0,0 +1,2 @@
Make ``end_lineno`` and ``end_col_offset`` required on ``type_param`` ast
nodes.
2 changes: 1 addition & 1 deletion Parser/Python.asdl
Expand Up @@ -148,5 +148,5 @@ module Python
type_param = TypeVar(identifier name, expr? bound)
| ParamSpec(identifier name)
| TypeVarTuple(identifier name)
attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
attributes (int lineno, int col_offset, int end_lineno, int end_col_offset)
}
18 changes: 6 additions & 12 deletions Python/Python-ast.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0616c83

Please sign in to comment.