Skip to content

Commit 9ab5825

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent fdee836 commit 9ab5825

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/wtforms/validators.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ def _validate_mode(self, mode):
368368
if mode not in self._supported_modes:
369369
raise ValidatorSetupError(
370370
"Invalid mode value '{}'. Supported values: {}".format(
371-
mode,
372-
", ".join(self._supported_modes)
371+
mode, ", ".join(self._supported_modes)
373372
)
374373
)
375374
return mode

tests/validators/test_regexp.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ def test_regex_invalid_mode(dummy_form, dummy_field, re_mode):
244244
regexp("^a", mode=re_mode)
245245

246246
expected = (
247-
"Invalid mode value '{}'. "
248-
"Supported values: search, match, fullmatch"
249-
).format(re_mode)
247+
f"Invalid mode value '{re_mode}'. " "Supported values: search, match, fullmatch"
248+
)
250249

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

0 commit comments

Comments
 (0)