Skip to content

Commit

Permalink
Remove relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Dec 15, 2021
1 parent 92d93c1 commit 5b4d5b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jsonschema/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# The files() API was added in Python 3.9.
if sys.version_info >= (3, 9): # pragma: no cover
import importlib.resources as resources
from importlib import resources
else: # pragma: no cover
import importlib_resources as resources

Expand Down
7 changes: 3 additions & 4 deletions jsonschema/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
from typing_extensions import Protocol, runtime_checkable

from jsonschema._format import FormatChecker

from ._types import TypeChecker
from .exceptions import ValidationError
from .validators import RefResolver
from jsonschema._types import TypeChecker
from jsonschema.exceptions import ValidationError
from jsonschema.validators import RefResolver

# For code authors working on the validator protocol, these are the three
# use-cases which should be kept in mind:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ console_scripts =
jsonschema = schemas/*.json, schemas/*/*.json

[flake8]
ban-relative-imports = true
inline-quotes = "
exclude =
jsonschema/__init__.py
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ commands = {envbindir}/detect-secrets scan {toxinidir}
[testenv:style]
deps =
flake8
flake8-broken-line
flake8-bugbear
flake8-commas
flake8-quotes
flake8-broken-line
flake8-tidy-imports
commands =
{envpython} -m flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs

Expand Down

0 comments on commit 5b4d5b7

Please sign in to comment.