Skip to content
Open
Show file tree
Hide file tree
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: 2 additions & 3 deletions jsonmodels/utilities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import sre_constants
from collections import namedtuple

SCALAR_TYPES = tuple(list((str,)) + [int, float, bool])
Expand Down Expand Up @@ -97,10 +96,10 @@ def is_ecma_regex(regex):

try:
re.compile(regex)
except sre_constants.error as err:
except re.error as err:
raise ValueError(
f"Given regex {regex} isn't ECMA regex nor Python regex: {err}."
)
) from err
return False


Expand Down
2 changes: 1 addition & 1 deletion tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_pep8_and_complexity():
not tests.LINT or not tests.CHECK_SPELLING, reason="No spelling check."
)
def test_docs():
run("sphinx-build -b spelling -d docs/_build/doctress " "docs docs/build/spelling")
run("sphinx-build -b spelling -d docs/_build/doctress docs docs/build/spelling")


def _collect_static(dirs):
Expand Down
Loading