Skip to content

Commit 807fe8e

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent b036194 commit 807fe8e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/wtforms/validators.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class ValidatorSetupError(ValueError):
4545
"""
4646
Raised when a validator is configured improperly.
4747
"""
48+
4849
def __init__(self, message="", *args, **kwargs):
4950
ValueError.__init__(self, message, *args, **kwargs)
5051

@@ -366,7 +367,9 @@ def __init__(self, regex, flags=0, message=None, mode="match"):
366367
def _validate_mode(self, mode):
367368
if mode not in self._supported_modes:
368369
raise ValidatorSetupError(
369-
"Invalid regexp mode. Supported values: {}".format(", ".join(self._supported_modes))
370+
"Invalid regexp mode. Supported values: {}".format(
371+
", ".join(self._supported_modes)
372+
)
370373
)
371374
return mode
372375

tests/validators/test_regexp.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
import pytest
44

5-
from wtforms.validators import regexp, ValidatorSetupError
5+
from wtforms.validators import regexp
66
from wtforms.validators import ValidationError
7+
from wtforms.validators import ValidatorSetupError
78

89

910
def grab_error_message(callable, form, field):
@@ -232,7 +233,7 @@ def test_regexp_message(dummy_form, dummy_field):
232233
[],
233234
{},
234235
(),
235-
]
236+
],
236237
)
237238
def test_regex_invalid_mode(dummy_form, dummy_field, re_mode):
238239
"""

0 commit comments

Comments
 (0)