Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pylight/src/parser/ruff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ impl<'a> Visitor<'a> for SymbolExtractor<'a> {
// Note: func_def.is_async is available to check if it's async
let kind = self.determine_function_kind();
let container = self.build_container_name();
// Use the name's range to get the line of the actual 'def' keyword
let (line, column) = self.get_line_column(func_def.name.range.start().to_u32());
// Use the function definition's range to get the position of the 'def' keyword
let (line, column) = self.get_line_column(func_def.range.start().to_u32());

// Get module name from file path
let module_path = self
Expand Down Expand Up @@ -144,8 +144,8 @@ impl<'a> Visitor<'a> for SymbolExtractor<'a> {
let name_str = class_def.name.to_string();
let kind = self.determine_class_kind();
let container = self.build_container_name();
// Use the name's range to get the line of the actual 'class' keyword
let (line, column) = self.get_line_column(class_def.name.range.start().to_u32());
// Use the class definition's range to get the position of the 'class' keyword
let (line, column) = self.get_line_column(class_def.range.start().to_u32());

// Get module name from file path
let module_path = self
Expand Down
Loading