Improve F811 range for function and class definitions (#1499)

This commit is contained in:
Harutaka Kawamura 2022-12-31 21:42:18 +09:00 committed by GitHub
parent 4e9e58bdc0
commit 3a280039e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 14 deletions

View file

@ -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()),
},
);

View file

@ -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: ~

View file

@ -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: ~

View file

@ -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: ~

View file

@ -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: ~