Skip to content

Commit

Permalink
Fixed doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsidd committed Oct 20, 2024
1 parent 489566d commit 8d8f369
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conversions/base64_to_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ def base64_to_bin(base64_str: str) -> str:
ValueError: Invalid base64 string. Invalid char - at pos 1
>>> base64_to_bin("")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 8, in base64_to_bin
File "/usr/lib/python3.12/doctest.py", line 1368, in __run
exec(compile(example.source, filename, "single",
File "<doctest __main__.base64_to_bin[3]>", line 1, in <module>
base64_to_bin("")
File "/home/sidd/Projects/PythonAlgorithms/./conversions/base64_to_binary.py", line 89, in base64_to_bin

Check failure on line 87 in conversions/base64_to_binary.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E501)

conversions/base64_to_binary.py:87:89: E501 Line too long (110 > 88)
raise ValueError("Empty string was passed to the function")
ValueError: Empty string was passed to the function
"""
b64_str = str(base64_str).strip()
Expand Down

0 comments on commit 8d8f369

Please sign in to comment.