diff --git a/example/example.py b/example/example.py index 741648c..3f42d6d 100644 --- a/example/example.py +++ b/example/example.py @@ -1,5 +1,6 @@ from flask import Flask, jsonify from marshmallow import Schema, fields + from marshmallow_jsonschema import JSONSchema app = Flask(__name__) diff --git a/marshmallow_jsonschema/base.py b/marshmallow_jsonschema/base.py index 700cae4..f4d1276 100644 --- a/marshmallow_jsonschema/base.py +++ b/marshmallow_jsonschema/base.py @@ -1,17 +1,15 @@ import datetime import decimal +import typing import uuid from enum import Enum from inspect import isclass -import typing -from marshmallow import fields, missing, Schema, validate +from marshmallow import EXCLUDE, INCLUDE, RAISE, Schema, fields, missing, validate from marshmallow.class_registry import get_class from marshmallow.decorators import post_dump from marshmallow.utils import _Missing -from marshmallow import INCLUDE, EXCLUDE, RAISE - try: from marshmallow_union import Union diff --git a/marshmallow_jsonschema/extensions/__init__.py b/marshmallow_jsonschema/extensions/__init__.py index f909f3e..6a67016 100644 --- a/marshmallow_jsonschema/extensions/__init__.py +++ b/marshmallow_jsonschema/extensions/__init__.py @@ -1,4 +1,3 @@ from .react_jsonschema_form import ReactJsonSchemaFormJSONSchema - __all__ = ("ReactJsonSchemaFormJSONSchema",) diff --git a/pyproject.toml b/pyproject.toml index 36619cc..c40f43f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,5 @@ [tool.black] target-version = ['py36', 'py37', 'py38'] + +[tool.isort] +profile = "black" diff --git a/requirements-test.txt b/requirements-test.txt index 60896eb..b67d436 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -8,3 +8,4 @@ marshmallow-union mypy>=0.910 pre-commit~=2.15 +isort diff --git a/setup.py b/setup.py index 4974e20..f1d555c 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,7 @@ import io import os -from setuptools import setup, find_packages - +from setuptools import find_packages, setup PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/tests/test_additional_properties.py b/tests/test_additional_properties.py index c88c450..702bc3b 100644 --- a/tests/test_additional_properties.py +++ b/tests/test_additional_properties.py @@ -1,7 +1,8 @@ import pytest -from marshmallow import Schema, fields, RAISE, INCLUDE, EXCLUDE +from marshmallow import EXCLUDE, INCLUDE, RAISE, Schema, fields + +from marshmallow_jsonschema import JSONSchema, UnsupportedValueError -from marshmallow_jsonschema import UnsupportedValueError, JSONSchema from . import validate_and_dump diff --git a/tests/test_dump.py b/tests/test_dump.py index b1d53d5..fe0b21a 100644 --- a/tests/test_dump.py +++ b/tests/test_dump.py @@ -7,6 +7,7 @@ from marshmallow_union import Union from marshmallow_jsonschema import JSONSchema, UnsupportedValueError + from . import UserSchema, validate_and_dump diff --git a/tests/test_imports.py b/tests/test_imports.py index 17494d8..fdee771 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -1,4 +1,5 @@ import importlib + import marshmallow_jsonschema diff --git a/tests/test_validation.py b/tests/test_validation.py index c8222bd..6fd891c 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -7,6 +7,7 @@ from marshmallow_union import Union from marshmallow_jsonschema import JSONSchema, UnsupportedValueError + from . import UserSchema, validate_and_dump