mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-31 15:48:22 +00:00
Improve F811 range for function and class definitions (#1499)
This commit is contained in:
parent
4e9e58bdc0
commit
3a280039e1
5 changed files with 14 additions and 14 deletions
|
@ -532,7 +532,7 @@ where
|
|||
Binding {
|
||||
kind: BindingKind::FunctionDefinition,
|
||||
used: None,
|
||||
range: Range::from_located(stmt),
|
||||
range: helpers::identifier_range(stmt, self.locator),
|
||||
source: Some(self.current_stmt().clone()),
|
||||
},
|
||||
);
|
||||
|
@ -1412,7 +1412,7 @@ where
|
|||
Binding {
|
||||
kind: BindingKind::ClassDefinition,
|
||||
used: None,
|
||||
range: Range::from_located(stmt),
|
||||
range: helpers::identifier_range(stmt, self.locator),
|
||||
source: Some(self.current_stmt().clone()),
|
||||
},
|
||||
);
|
||||
|
|
|
@ -8,10 +8,10 @@ expression: checks
|
|||
- 6
|
||||
location:
|
||||
row: 10
|
||||
column: 0
|
||||
column: 4
|
||||
end_location:
|
||||
row: 11
|
||||
column: 8
|
||||
row: 10
|
||||
column: 7
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ expression: checks
|
|||
- 1
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
column: 4
|
||||
end_location:
|
||||
row: 5
|
||||
column: 8
|
||||
row: 4
|
||||
column: 6
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ expression: checks
|
|||
- 3
|
||||
location:
|
||||
row: 8
|
||||
column: 8
|
||||
column: 12
|
||||
end_location:
|
||||
row: 9
|
||||
column: 16
|
||||
row: 8
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ expression: checks
|
|||
- 6
|
||||
location:
|
||||
row: 9
|
||||
column: 8
|
||||
column: 12
|
||||
end_location:
|
||||
row: 10
|
||||
column: 16
|
||||
row: 9
|
||||
column: 14
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue