diff --git a/jsonschema/tests/test_validators.py b/jsonschema/tests/test_validators.py index fb59b83..8380de1 100644 --- a/jsonschema/tests/test_validators.py +++ b/jsonschema/tests/test_validators.py @@ -196,7 +196,7 @@ class TestValidationErrorMessages(unittest.TestCase): u"additionalProperties": False, u"patternProperties": { u"^abc$": {u"type": u"string"}, - u"^def$": {u"type": u"string"} + u"^def$": {u"type": u"string"}, }} message = self.message_for({u"zebra": 123}, schema, cls=Draft4Validator) diff --git a/jsonschema/validators.py b/jsonschema/validators.py index ee1ec94..0300760 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -14,9 +14,14 @@ from jsonschema.compat import ( Sequence, urljoin, urlsplit, urldefrag, unquote, urlopen, str_types, int_types, iteritems, lru_cache, ) -from jsonschema.exceptions import ErrorTree # Backwards compat # noqa: F401 from jsonschema.exceptions import RefResolutionError, SchemaError, UnknownType +# Sigh. https://gitlab.com/pycqa/flake8/issues/280 +# https://github.com/pyga/ebb-lint/issues/7 +# Imported for backwards compatibility. +from jsonschema.exceptions import ErrorTree +ErrorTree + _unset = _utils.Unset() diff --git a/tox.ini b/tox.ini index c55a167..181a8e4 100644 --- a/tox.ini +++ b/tox.ini @@ -55,9 +55,8 @@ commands = [testenv:style] basepython = pypy -deps = flake8 -commands = - flake8 [] --max-complexity 10 {toxinidir}/jsonschema +deps = ebb-lint +commands = flake8 {posargs} --max-complexity 10 {toxinidir}/jsonschema [flake8]