From ee4789776acd7f3bed166b0c81e96cce1c0c47c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Wed, 27 Dec 2017 20:47:32 +0100 Subject: [PATCH] Fix isort inconsistency --- setup.py | 1 - src/drf_yasg/codecs.py | 3 ++- src/drf_yasg/views.py | 3 +-- tests/test_management.py | 3 ++- tox.ini | 11 ++++++++--- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 03af344e..e6b2b376 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,6 @@ import io import os import sys - from setuptools import find_packages, setup requirements_setup = ['setuptools_scm==1.15.6'] diff --git a/src/drf_yasg/codecs.py b/src/drf_yasg/codecs.py index d52a54c7..40a9e4c8 100644 --- a/src/drf_yasg/codecs.py +++ b/src/drf_yasg/codecs.py @@ -1,9 +1,10 @@ +from future.utils import raise_from + import copy import json from collections import OrderedDict from coreapi.compat import force_bytes -from future.utils import raise_from from ruamel import yaml from . import openapi diff --git a/src/drf_yasg/views.py b/src/drf_yasg/views.py index b7ddffa3..b05a54a5 100644 --- a/src/drf_yasg/views.py +++ b/src/drf_yasg/views.py @@ -10,8 +10,7 @@ from rest_framework.settings import api_settings from rest_framework.views import APIView -from drf_yasg.app_settings import swagger_settings - +from .app_settings import swagger_settings from .generators import OpenAPISchemaGenerator from .renderers import OpenAPIRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer diff --git a/tests/test_management.py b/tests/test_management.py index 4e0cda6e..d39e2378 100644 --- a/tests/test_management.py +++ b/tests/test_management.py @@ -1,3 +1,5 @@ +from six import StringIO + import json import os import random @@ -8,7 +10,6 @@ import pytest from django.contrib.auth.models import User from django.core.management import call_command -from six import StringIO from drf_yasg.codecs import yaml_sane_load diff --git a/tox.ini b/tox.ini index eec3bb73..195780b0 100644 --- a/tox.ini +++ b/tox.ini @@ -64,6 +64,11 @@ skip_glob = **/migrations/* atomic = true multi_line_output = 5 line_length = 120 -known_standard_library = types -known_third_party = pytest,_pytest,django,rest_framework -known_first_party = drf_yasg +known_future_library = future,six +known_standard_library = + collections,copy,distutils,functools,inspect,io,json,logging,operator,os,pkg_resources,re,setuptools,sys, + types,warnings +known_third_party = + coreapi,coreschema,datadiff,django,django_filters,djangorestframework_camel_case,flex,inflection,pygments, + pytest,rest_framework,ruamel,setuptools_scm,swagger_spec_validator,uritemplate +known_first_party = drf_yasg,testproj,articles,snippets,users,urlconfs