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

View File

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

View File

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

View File

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

View File

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