mirror of https://github.com/astral-sh/ruff
Improve F811 range for function and class definitions (#1499)
This commit is contained in:
parent
4e9e58bdc0
commit
3a280039e1
|
|
@ -532,7 +532,7 @@ where
|
||||||
Binding {
|
Binding {
|
||||||
kind: BindingKind::FunctionDefinition,
|
kind: BindingKind::FunctionDefinition,
|
||||||
used: None,
|
used: None,
|
||||||
range: Range::from_located(stmt),
|
range: helpers::identifier_range(stmt, self.locator),
|
||||||
source: Some(self.current_stmt().clone()),
|
source: Some(self.current_stmt().clone()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -1412,7 +1412,7 @@ where
|
||||||
Binding {
|
Binding {
|
||||||
kind: BindingKind::ClassDefinition,
|
kind: BindingKind::ClassDefinition,
|
||||||
used: None,
|
used: None,
|
||||||
range: Range::from_located(stmt),
|
range: helpers::identifier_range(stmt, self.locator),
|
||||||
source: Some(self.current_stmt().clone()),
|
source: Some(self.current_stmt().clone()),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ expression: checks
|
||||||
- 6
|
- 6
|
||||||
location:
|
location:
|
||||||
row: 10
|
row: 10
|
||||||
column: 0
|
column: 4
|
||||||
end_location:
|
end_location:
|
||||||
row: 11
|
row: 10
|
||||||
column: 8
|
column: 7
|
||||||
fix: ~
|
fix: ~
|
||||||
parent: ~
|
parent: ~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ expression: checks
|
||||||
- 1
|
- 1
|
||||||
location:
|
location:
|
||||||
row: 4
|
row: 4
|
||||||
column: 0
|
column: 4
|
||||||
end_location:
|
end_location:
|
||||||
row: 5
|
row: 4
|
||||||
column: 8
|
column: 6
|
||||||
fix: ~
|
fix: ~
|
||||||
parent: ~
|
parent: ~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ expression: checks
|
||||||
- 3
|
- 3
|
||||||
location:
|
location:
|
||||||
row: 8
|
row: 8
|
||||||
column: 8
|
column: 12
|
||||||
end_location:
|
end_location:
|
||||||
row: 9
|
row: 8
|
||||||
column: 16
|
column: 14
|
||||||
fix: ~
|
fix: ~
|
||||||
parent: ~
|
parent: ~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ expression: checks
|
||||||
- 6
|
- 6
|
||||||
location:
|
location:
|
||||||
row: 9
|
row: 9
|
||||||
column: 8
|
column: 12
|
||||||
end_location:
|
end_location:
|
||||||
row: 10
|
row: 9
|
||||||
column: 16
|
column: 14
|
||||||
fix: ~
|
fix: ~
|
||||||
parent: ~
|
parent: ~
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue