Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 4, 2026
commit 2ffa363b5e4037b39e48ba2e9dea98bd34238d96
2 changes: 2 additions & 0 deletions searches/linear_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
For manual testing run:
python3 linear_search.py
"""


def linear_search(sequence: list, target: int) -> int:

Check failure on line 12 in searches/linear_search.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (ARG001)

searches/linear_search.py:12:35: ARG001 Unused function argument: `target`
"""... existing docstring ..."""

if not sequence:
return -1


def linear_search(sequence: list, target: int) -> int:

Check failure on line 19 in searches/linear_search.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F811)

searches/linear_search.py:19:5: F811 Redefinition of unused `linear_search` from line 12: `linear_search` redefined here searches/linear_search.py:12:5: previous definition of `linear_search` here help: Remove definition: `linear_search`
"""A pure Python implementation of a linear search algorithm

:param sequence: a collection with comparable items (No sorting required)
Expand Down
Loading