From 9802ad77dc74201eb28d0af062acd1af024ad66c Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 2 Jul 2025 12:53:39 +0000 Subject: [PATCH] Python: Update `types_new.py` and test output --- .../extractor/tests/parser/types_new.expected | 34 ------------------- python/extractor/tests/parser/types_new.py | 2 +- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/python/extractor/tests/parser/types_new.expected b/python/extractor/tests/parser/types_new.expected index ac470c08cf0..de4f4486280 100644 --- a/python/extractor/tests/parser/types_new.expected +++ b/python/extractor/tests/parser/types_new.expected @@ -308,40 +308,6 @@ Module: [1, 0] - [23, 0] ] ctx: Load ctx: Load - TypeAlias: [20, 0] - [20, 41] - name: - Name: [20, 5] - [20, 9] - variable: Variable('Baz2', None) - ctx: Store - type_parameters: [ - ParamSpec: [20, 10] - [20, 27] - name: - Name: [20, 12] - [20, 14] - variable: Variable('P2', None) - ctx: Store - default: - List: [20, 17] - [20, 27] - elts: [ - Name: [20, 18] - [20, 21] - variable: Variable('int', None) - ctx: Load - Name: [20, 23] - [20, 26] - variable: Variable('str', None) - ctx: Load - ] - ctx: Load - ] - value: - Subscript: [20, 31] - [20, 41] - value: - Name: [20, 31] - [20, 35] - variable: Variable('Spam', None) - ctx: Load - index: - Name: [20, 38] - [20, 40] - variable: Variable('P2', None) - ctx: Load - ctx: Load TypeAlias: [21, 0] - [21, 41] name: Name: [21, 5] - [21, 9] diff --git a/python/extractor/tests/parser/types_new.py b/python/extractor/tests/parser/types_new.py index 12e5eac0556..9709d0f3044 100644 --- a/python/extractor/tests/parser/types_new.py +++ b/python/extractor/tests/parser/types_new.py @@ -17,6 +17,6 @@ class Qux1[*Ts1 = *tuple[int, bool]]: ... # TypeAliases type Foo2[T15, U1 = str] = Bar1[T15, U1] -type Baz2[**P2 = [int, str]] = Spam[**P2] +# type Baz2[**P2 = [int, str]] = Spam[**P2] # From the PEP, but this is not actually valid syntax! type Qux2[*Ts2 = *tuple[str]] = Ham[*Ts2] type Rab[U2, T15 = str] = Bar2[T15, U2]