Skip to content

Commit

Permalink
errors
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Apr 15, 2024
1 parent 121faf6 commit 374d32e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def describe_failure(self, failure: Failure) -> str | None:
A string description of the failure.
"""
if isinstance(failure, Number.NotANumber):
return f"Must be a valid number."
return "Must be a valid number."
elif isinstance(failure, Number.NotInRange):
if self.minimum is None and self.maximum is not None:
return f"Must be less than or equal to {self.maximum}."
Expand Down Expand Up @@ -364,7 +364,7 @@ def describe_failure(self, failure: Failure) -> str | None:
A string description of the failure.
"""
if isinstance(failure, Integer.NotAnInteger):
return f"Must be a valid integer."
return "Must be a valid integer."
elif isinstance(failure, Integer.NotInRange):
if self.minimum is None and self.maximum is not None:
return f"Must be less than or equal to {self.maximum}."
Expand Down

0 comments on commit 374d32e

Please sign in to comment.