Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions wordy/wordy.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ def _math_operation(result: int, question: list[str]) -> tuple[int, list[str]]:
"""
math_operator: str = question[0]
# if the question contains an unknown operation.
if (
math_operator not in STR_TO_OPERATOR
and not math_operator.isdigit()
):
if math_operator not in STR_TO_OPERATOR and not math_operator.isdigit():
raise ValueError("unknown operation")
# if the question is malformed or invalid.
if math_operator.isdigit():
Expand Down