Skip to content

Commit 37529a3

Browse files
committed
Fix ruff linter errors: prefix unused parameters with underscore
- Renamed 'leonardo' to '_leonardo' in _extract_from_heap and _find_parent - Indicates parameters are intentionally unused in this implementation - All doctests still pass - No linter errors
1 parent 21f2151 commit 37529a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/smooth_sort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _add_to_heap(arr: list[int], end: int, leonardo: list[int]) -> None:
124124
_heapify_up(arr, end, leonardo)
125125

126126

127-
def _extract_from_heap(arr: list[int], end: int, leonardo: list[int]) -> None:
127+
def _extract_from_heap(arr: list[int], end: int, _leonardo: list[int]) -> None:
128128
"""
129129
Remove maximum element from heap ending at index 'end'.
130130
@@ -193,7 +193,7 @@ def _heapify_down(arr: list[int], index: int, end: int) -> None:
193193
break
194194

195195

196-
def _find_parent(index: int, leonardo: list[int]) -> int:
196+
def _find_parent(index: int, _leonardo: list[int]) -> int:
197197
"""
198198
Find parent index in Leonardo heap structure.
199199

0 commit comments

Comments
 (0)