Remove useless code in doctests (#7733)

* refactor: Fix matrix display deprecation

* refactor: Remove useless `print` and `pass` statements

* revert: Replace broken doctests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert: Fix failing doctests

* chore: Satisfy pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Caeden Perelli-Harris
2022-10-27 21:52:00 +01:00
committed by GitHub
parent 501a1cf0c7
commit 61eedc16c3
21 changed files with 51 additions and 61 deletions

View File

@ -14,17 +14,17 @@ def rec_insertion_sort(collection: list, n: int):
>>> col = [1, 2, 1]
>>> rec_insertion_sort(col, len(col))
>>> print(col)
>>> col
[1, 1, 2]
>>> col = [2, 1, 0, -1, -2]
>>> rec_insertion_sort(col, len(col))
>>> print(col)
>>> col
[-2, -1, 0, 1, 2]
>>> col = [1]
>>> rec_insertion_sort(col, len(col))
>>> print(col)
>>> col
[1]
"""
# Checks if the entire collection has been sorted
@ -41,17 +41,17 @@ def insert_next(collection: list, index: int):
>>> col = [3, 2, 4, 2]
>>> insert_next(col, 1)
>>> print(col)
>>> col
[2, 3, 4, 2]
>>> col = [3, 2, 3]
>>> insert_next(col, 2)
>>> print(col)
>>> col
[3, 2, 3]
>>> col = []
>>> insert_next(col, 1)
>>> print(col)
>>> col
[]
"""
# Checks order between adjacent elements