refactor: Indent ... for visual purposes (#7744)

This commit is contained in:
Caeden Perelli-Harris
2022-10-27 18:42:30 +01:00
committed by GitHub
parent e8915097c4
commit 9bba42eca8
46 changed files with 134 additions and 134 deletions

View File

@ -196,7 +196,7 @@ def binary_search_tree() -> None:
1 4 7 6 3 13 14 10 8
>>> BinarySearchTree().search(6)
Traceback (most recent call last):
...
...
IndexError: Warning: Tree is empty! please use another.
"""
testlist = (8, 3, 6, 1, 10, 14, 13, 4, 7)

View File

@ -21,11 +21,11 @@ def binary_tree_mirror(binary_tree: dict, root: int = 1) -> dict:
{1: [3, 2], 2: [5, 4], 3: [7, 6], 4: [11, 10]}
>>> binary_tree_mirror({ 1: [2,3], 2: [4,5], 3: [6,7], 4: [10,11]}, 5)
Traceback (most recent call last):
...
...
ValueError: root 5 is not present in the binary_tree
>>> binary_tree_mirror({}, 5)
Traceback (most recent call last):
...
...
ValueError: binary tree cannot be empty
"""
if not binary_tree:

View File

@ -67,7 +67,7 @@ def factorial(n: int) -> int:
True
>>> factorial(-5) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
...
ValueError: factorial() not defined for negative values
"""
if n < 0: