From f348084d85f2b9759910a984a21ea66300bdc0de Mon Sep 17 00:00:00 2001 From: Cristi Vijdea Date: Mon, 4 Mar 2019 00:46:00 +0200 Subject: [PATCH] Fix Python 2.7 compat --- src/drf_yasg/openapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drf_yasg/openapi.py b/src/drf_yasg/openapi.py index 853587e..d03b641 100644 --- a/src/drf_yasg/openapi.py +++ b/src/drf_yasg/openapi.py @@ -624,10 +624,11 @@ class ReferenceResolver(object): {'definitions': OrderedDict([('Article', Schema(...)]), 'parameters': OrderedDict()} """ - def __init__(self, *scopes, force_init=False): + def __init__(self, *scopes, **kwargs): """ :param str scopes: an enumeration of the valid scopes this resolver will contain """ + force_init = kwargs.pop('force_init', False) if not force_init: raise AssertionError( "Creating an instance of ReferenceResolver almost certainly won't do what you want it to do.\n"