diff --git a/docs/changelog.rst b/docs/changelog.rst index c02b793b..6b0076c1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,6 +9,7 @@ Changelog - **ADDED:** :ref:`generate_swagger management command ` (:issue:`29`, :pr:`31`, thanks to :ghuser:`beaugunderson`) +- **FIXED:** fixed improper generation of ``\Z`` regex tokens - will now be repalced by ``$`` ********* **1.1.0** diff --git a/src/drf_yasg/__init__.py b/src/drf_yasg/__init__.py index 84dacc23..21c6d57e 100644 --- a/src/drf_yasg/__init__.py +++ b/src/drf_yasg/__init__.py @@ -1,5 +1,5 @@ # coding=utf-8 -from pkg_resources import get_distribution, DistributionNotFound +from pkg_resources import DistributionNotFound, get_distribution __author__ = """Cristi V.""" __email__ = 'cristi@cvjd.me' diff --git a/src/drf_yasg/inspectors/__init__.py b/src/drf_yasg/inspectors/__init__.py index 50d7aa24..8c32bf8e 100644 --- a/src/drf_yasg/inspectors/__init__.py +++ b/src/drf_yasg/inspectors/__init__.py @@ -1,17 +1,13 @@ +from ..app_settings import swagger_settings from .base import ( - BaseInspector, ViewInspector, FilterInspector, PaginatorInspector, - FieldInspector, SerializerInspector, NotHandled + BaseInspector, FieldInspector, FilterInspector, NotHandled, PaginatorInspector, SerializerInspector, ViewInspector ) from .field import ( - InlineSerializerInspector, ReferencingSerializerInspector, RelatedFieldInspector, SimpleFieldInspector, - FileFieldInspector, ChoiceFieldInspector, DictFieldInspector, StringDefaultFieldInspector, - CamelCaseJSONFilter -) -from .query import ( - CoreAPICompatInspector, DjangoRestResponsePagination + CamelCaseJSONFilter, ChoiceFieldInspector, DictFieldInspector, FileFieldInspector, InlineSerializerInspector, + ReferencingSerializerInspector, RelatedFieldInspector, SimpleFieldInspector, StringDefaultFieldInspector ) +from .query import CoreAPICompatInspector, DjangoRestResponsePagination from .view import SwaggerAutoSchema -from ..app_settings import swagger_settings # these settings must be accesed only after definig/importing all the classes in this module to avoid ImportErrors ViewInspector.field_inspectors = swagger_settings.DEFAULT_FIELD_INSPECTORS diff --git a/tox.ini b/tox.ini index 195780b0..abadc40a 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ exclude = **/migrations/* [isort] skip = .eggs,.tox,docs skip_glob = **/migrations/* +not_skip = __init__.py atomic = true multi_line_output = 5 line_length = 120