Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Nov 22, 2024
1 parent fdee836 commit 9ab5825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/wtforms/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ def _validate_mode(self, mode):
if mode not in self._supported_modes:
raise ValidatorSetupError(
"Invalid mode value '{}'. Supported values: {}".format(
mode,
", ".join(self._supported_modes)
mode, ", ".join(self._supported_modes)
)
)
return mode
Expand Down
5 changes: 2 additions & 3 deletions tests/validators/test_regexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ def test_regex_invalid_mode(dummy_form, dummy_field, re_mode):
regexp("^a", mode=re_mode)

expected = (
"Invalid mode value '{}'. "
"Supported values: search, match, fullmatch"
).format(re_mode)
f"Invalid mode value '{re_mode}'. " "Supported values: search, match, fullmatch"
)

assert e.value.args[0] == expected

0 comments on commit 9ab5825

Please sign in to comment.