Reformat code to pythonic standards
This commit is contained in:
1 parent
ea62bdfc0b
commit
b1732c07c5
5 files changed
+123
-51
No files matched your search
+3
-4
@@ -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
|
||||
Reference in new issue
Block a user