Skip to content

Commit 6e1281a

Browse files
committed
isorted.
1 parent 07665ec commit 6e1281a

13 files changed

+22
-16
lines changed

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import jsonschema
1111

12-
1312
# If extensions (or modules to document with autodoc) are in another directory,
1413
# add these directories to sys.path here. If the directory is relative to the
1514
# documentation root, use os.path.abspath to make it absolute, like shown here.

docs/jsonschema_role.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
from datetime import datetime
2-
from docutils import nodes
32
import errno
43
import os
54

5+
from docutils import nodes
6+
67
try:
78
import urllib2 as urllib
89
except ImportError:
910
import urllib.request as urllib
1011

11-
import certifi
12-
import jsonschema
1312
from lxml import html
13+
import certifi
1414

15+
import jsonschema
1516

1617
__version__ = "1.1.0"
1718
VALIDATION_SPEC = "https://json-schema.org/draft-07/json-schema-validation.html"

jsonschema/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
instance under a schema, and will create a validator for you.
99
"""
1010

11-
from jsonschema.exceptions import (
12-
ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
13-
)
1411
from jsonschema._format import (
1512
FormatChecker,
1613
draft3_format_checker,
@@ -19,6 +16,13 @@
1916
draft7_format_checker,
2017
)
2118
from jsonschema._types import TypeChecker
19+
from jsonschema.exceptions import (
20+
ErrorTree,
21+
FormatError,
22+
RefResolutionError,
23+
SchemaError,
24+
ValidationError,
25+
)
2226
from jsonschema.validators import (
2327
Draft3Validator,
2428
Draft4Validator,
@@ -27,6 +31,7 @@
2731
RefResolver,
2832
validate,
2933
)
34+
3035
try:
3136
from importlib import metadata
3237
except ImportError: # for Python<3.8

jsonschema/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from jsonschema.cli import main
2+
23
main()

jsonschema/benchmarks/issue232.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from jsonschema.tests._suite import Version
1313
import jsonschema
1414

15-
1615
issue232 = Version(
1716
path=Path(__file__).parent / "issue232",
1817
remotes=m(),

jsonschema/benchmarks/json_schema_test_suite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99

1010
from jsonschema.tests._suite import Suite
1111

12-
1312
if __name__ == "__main__":
1413
Suite().benchmark(runner=Runner())

jsonschema/exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from jsonschema import _utils
1212

13-
1413
WEAK_MATCHES = frozenset(["anyOf", "oneOf"])
1514
STRONG_MATCHES = frozenset()
1615

jsonschema/tests/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from io import StringIO
21
from contextlib import contextmanager
2+
from io import StringIO
33
import sys
44

55

jsonschema/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import subprocess
99
import sys
1010

11-
from jsonschema import Draft4Validator, cli, __version__
11+
from jsonschema import Draft4Validator, __version__, cli
1212
from jsonschema.exceptions import SchemaError, ValidationError
1313
from jsonschema.tests._helpers import captured_output
1414
from jsonschema.validators import _LATEST_VERSION, validate

jsonschema/tests/test_format.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
from unittest import TestCase
66

7-
from jsonschema import FormatError, ValidationError, FormatChecker
7+
from jsonschema import FormatChecker, FormatError, ValidationError
88
from jsonschema.validators import Draft4Validator
99

10-
1110
BOOM = ValueError("Boom!")
1211
BANG = ZeroDivisionError("Bang!")
1312

jsonschema/tests/test_jsonschema_test_suite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from jsonschema.tests._suite import Suite
2424
from jsonschema.validators import _DEPRECATED_DEFAULT_TYPES, create
2525

26-
2726
SUITE = Suite()
2827
DRAFT3 = SUITE.version(name="draft3")
2928
DRAFT4 = SUITE.version(name="draft4")

jsonschema/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
_validators,
1818
exceptions,
1919
)
20-
2120
# Sigh. https://gitlab.com/pycqa/flake8/issues/280
2221
# https://github.com/pyga/ebb-lint/issues/7
2322
# Imported for backwards compatibility.
2423
from jsonschema.exceptions import ErrorTree
24+
2525
ErrorTree
2626

2727

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ requires = [
88
]
99
build-backend = "setuptools.build_meta"
1010

11+
[tool.isort]
12+
from_first = true
13+
include_trailing_comma = true
14+
multi_line_output = 3
15+
1116
[tool.setuptools_scm]

0 commit comments

Comments
 (0)