Revert "[ty] Fix completion in decorator without class or function definition" (#22176)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/decorator_missing_expression.py
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -9,44 +10,6 @@ Module(
|
||||
node_index: NodeIndex(None),
|
||||
range: 0..51,
|
||||
body: [
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
node_index: NodeIndex(None),
|
||||
range: 0..4,
|
||||
is_async: false,
|
||||
decorator_list: [
|
||||
Decorator {
|
||||
range: 0..4,
|
||||
node_index: NodeIndex(None),
|
||||
expression: Name(
|
||||
ExprName {
|
||||
node_index: NodeIndex(None),
|
||||
range: 1..4,
|
||||
id: Name("def"),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
name: Identifier {
|
||||
id: Name(""),
|
||||
range: 4..4,
|
||||
node_index: NodeIndex(None),
|
||||
},
|
||||
type_params: None,
|
||||
parameters: Parameters {
|
||||
range: 4..4,
|
||||
node_index: NodeIndex(None),
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kwarg: None,
|
||||
},
|
||||
returns: None,
|
||||
body: [],
|
||||
},
|
||||
),
|
||||
AnnAssign(
|
||||
StmtAnnAssign {
|
||||
node_index: NodeIndex(None),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/decorator_unexpected_token.py
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -9,44 +10,6 @@ Module(
|
||||
node_index: NodeIndex(None),
|
||||
range: 0..34,
|
||||
body: [
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
node_index: NodeIndex(None),
|
||||
range: 0..4,
|
||||
is_async: false,
|
||||
decorator_list: [
|
||||
Decorator {
|
||||
range: 0..4,
|
||||
node_index: NodeIndex(None),
|
||||
expression: Name(
|
||||
ExprName {
|
||||
node_index: NodeIndex(None),
|
||||
range: 1..4,
|
||||
id: Name("foo"),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
name: Identifier {
|
||||
id: Name(""),
|
||||
range: 4..4,
|
||||
node_index: NodeIndex(None),
|
||||
},
|
||||
type_params: None,
|
||||
parameters: Parameters {
|
||||
range: 4..4,
|
||||
node_index: NodeIndex(None),
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kwarg: None,
|
||||
},
|
||||
returns: None,
|
||||
body: [],
|
||||
},
|
||||
),
|
||||
With(
|
||||
StmtWith {
|
||||
node_index: NodeIndex(None),
|
||||
@@ -83,44 +46,6 @@ Module(
|
||||
],
|
||||
},
|
||||
),
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
node_index: NodeIndex(None),
|
||||
range: 23..27,
|
||||
is_async: false,
|
||||
decorator_list: [
|
||||
Decorator {
|
||||
range: 23..27,
|
||||
node_index: NodeIndex(None),
|
||||
expression: Name(
|
||||
ExprName {
|
||||
node_index: NodeIndex(None),
|
||||
range: 24..27,
|
||||
id: Name("foo"),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
name: Identifier {
|
||||
id: Name(""),
|
||||
range: 27..27,
|
||||
node_index: NodeIndex(None),
|
||||
},
|
||||
type_params: None,
|
||||
parameters: Parameters {
|
||||
range: 27..27,
|
||||
node_index: NodeIndex(None),
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kwarg: None,
|
||||
},
|
||||
returns: None,
|
||||
body: [],
|
||||
},
|
||||
),
|
||||
Assign(
|
||||
StmtAssign {
|
||||
node_index: NodeIndex(None),
|
||||
|
||||
Reference in New Issue
Block a user