Reformat code to pythonic standards

This commit is contained in:
chris committed 2026-05-27 08:20:30 -04:00
1 parent ea62bdfc0b
commit b1732c07c5
5 files changed
+123 -51

No files matched your search

+3 -4
View File
@@ -1,6 +1,3 @@
import re
class InvalidStringException(Exception):
"""Raised when a string cannot be converted to an integer."""
pass
@@ -25,4 +22,6 @@ def convert_string_to_integer(data: str) -> int | Exception:
else:
return int(data)
except ValueError as exc:
raise InvalidStringException("The string could not be converted to an integer.") from exc
raise InvalidStringException(
"The string could not be converted to an integer.",
) from exc