We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0ea028 commit 489566dCopy full SHA for 489566d
conversions/base64_to_binary.py
@@ -92,8 +92,9 @@ def base64_to_bin(base64_str: str) -> str:
92
b64_str = b64_str[1:]
93
bin_str = ""
94
for i, x in enumerate(b64_str):
95
- if not x in B64_TO_BITS:
96
- raise ValueError(f"Invalid base64 string. Invalid char {x} at pos {i}")
+ if x not in B64_TO_BITS:
+ exception_message = f"Invalid base64 string. Invalid char {x} at pos {i}"
97
+ raise ValueError(exception_message)
98
bin_str += B64_TO_BITS[x]
99
if is_negative:
100
bin_str = "-" + bin_str
0 commit comments