Skip to content

Commit 0d324de

Browse files
vipinkarthicpre-commit-ci[bot]github-actionscclauss
authoredOct 5, 2023
Doctest Error Correction of mirror_formulae.py (TheAlgorithms#9782)
* Python mirror_formulae.py is added to the repository * Changes done after reading readme.md * Changes for running doctest on all platforms * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Change 2 for Doctests * Changes for doctest 2 * updating DIRECTORY.md * Doctest whitespace error rectification to mirror_formulae.py * updating DIRECTORY.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
1 parent 4b6301d commit 0d324de

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎DIRECTORY.md

+1
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@
469469
* [Djb2](hashes/djb2.py)
470470
* [Elf](hashes/elf.py)
471471
* [Enigma Machine](hashes/enigma_machine.py)
472+
* [Fletcher16](hashes/fletcher16.py)
472473
* [Hamming Code](hashes/hamming_code.py)
473474
* [Luhn](hashes/luhn.py)
474475
* [Md5](hashes/md5.py)

‎physics/mirror_formulae.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def focal_length(distance_of_object: float, distance_of_image: float) -> float:
6666
>>> from math import isclose
6767
>>> isclose(focal_length(9.5, 6.7), 3.929012346)
6868
True
69-
>>> focal_length(0, 20)
69+
>>> focal_length(0, 20) # doctest: +NORMALIZE_WHITESPACE
7070
Traceback (most recent call last):
7171
...
7272
ValueError: Invalid inputs. Enter non zero values with respect
@@ -89,7 +89,7 @@ def object_distance(focal_length: float, distance_of_image: float) -> float:
8989
>>> from math import isclose
9090
>>> isclose(object_distance(10.5, 11.7), 102.375)
9191
True
92-
>>> object_distance(90, 0)
92+
>>> object_distance(90, 0) # doctest: +NORMALIZE_WHITESPACE
9393
Traceback (most recent call last):
9494
...
9595
ValueError: Invalid inputs. Enter non zero values with respect
@@ -112,7 +112,7 @@ def image_distance(focal_length: float, distance_of_object: float) -> float:
112112
>>> from math import isclose
113113
>>> isclose(image_distance(1.5, 6.7), 1.932692308)
114114
True
115-
>>> image_distance(0, 0)
115+
>>> image_distance(0, 0) # doctest: +NORMALIZE_WHITESPACE
116116
Traceback (most recent call last):
117117
...
118118
ValueError: Invalid inputs. Enter non zero values with respect

0 commit comments

Comments
 (0)
Please sign in to comment.