Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ lint.ignore = [ # `ruff rule S101` for a description of that rule
"NPY002", # Replace legacy `np.random.choice` call with `np.random.Generator` -- FIX ME
"PGH003", # Use specific rule codes when ignoring type issues -- FIX ME
"PLC1901", # `{}` can be simplified to `{}` as an empty string is falsey
"PLW0120", # `else` clause on loop without a `break` statement -- FIX ME
"PLW060", # Using global for `{name}` but no assignment is done -- DO NOT FIX
"PLW2901", # PLW2901: Redefined loop variable -- FIX ME
"PT011", # `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception
Expand Down
3 changes: 1 addition & 2 deletions searches/fibonacci_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ def fibonacci_search(arr: list, val: int) -> int:
elif val > item_k_1:
offset += fibonacci(fibb_k - 1)
fibb_k -= 2
else:
return -1
return -1


if __name__ == "__main__":
Expand Down
3 changes: 1 addition & 2 deletions searches/ternary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def ite_ternary_search(array: list[int], target: int) -> int:
else:
left = one_third + 1
right = two_third - 1
else:
return -1
return -1


def rec_ternary_search(left: int, right: int, array: list[int], target: int) -> int:
Expand Down