-
Notifications
You must be signed in to change notification settings - Fork 899
/
ruff_python_parser__parser__tests__stringized_annotation.snap
117 lines (117 loc) · 3.45 KB
/
ruff_python_parser__parser__tests__stringized_annotation.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
source: crates/ruff_python_parser/src/parser.rs
expression: parse_ast
---
[
ImportFrom(
StmtImportFrom {
range: 0..39,
module: Some(
Identifier {
id: "typing_extensions",
range: 5..22,
},
),
names: [
Alias {
range: 30..39,
name: Identifier {
id: "TypeAlias",
range: 30..39,
},
asname: None,
},
],
level: Some(
0,
),
},
),
Assign(
StmtAssign {
range: 42..83,
targets: [
Name(
ExprName {
range: 42..48,
id: "Alias1",
ctx: Store,
},
),
],
value: BinOp(
ExprBinOp {
range: 57..81,
left: BinOp(
ExprBinOp {
range: 57..70,
left: Name(
ExprName {
range: 57..60,
id: "int",
ctx: Load,
},
),
op: BitOr,
right: Name(
ExprName {
range: 67..70,
id: "str",
ctx: Load,
},
),
},
),
op: BitOr,
right: Name(
ExprName {
range: 77..81,
id: "bool",
ctx: Load,
},
),
},
),
},
),
AnnAssign(
StmtAnnAssign {
range: 109..165,
target: Name(
ExprName {
range: 109..115,
id: "Alias2",
ctx: Store,
},
),
annotation: Name(
ExprName {
range: 117..126,
id: "TypeAlias",
ctx: Load,
},
),
value: Some(
StringLiteral(
ExprStringLiteral {
range: 129..165,
value: StringLiteralValue {
inner: Single(
StringLiteral {
range: 129..165,
value: "\n int\n | str\n | bool\n",
flags: StringLiteralFlags {
quote_style: Double,
prefix: Empty,
triple_quoted: true,
},
},
),
},
},
),
),
simple: true,
},
),
]