* sorts: support comparable items in circle_sort
* style: format circle_sort
* Apply batched suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* sorts: type bubble sort for any comparable items
Bound bubble_sort_iterative and bubble_sort_recursive to a Comparable protocol instead of Any, add TypeError doctests, and cover the mixed-type failure in tests/test_sorts.py.
Refs #15234
* Update tests/test_sorts.py
* Add binary insertion sort to tests and rename function
Updated tests to include binary insertion sort and renamed test function.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Harsh Raj Singhania <harshrajsinghania@proton.me>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Improve binary insertion sort comparable typing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update binary_insertion_sort function signature
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add pytest for heap_sort
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add __init__.py to tests to fix Ruff namespace package error
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>