Skip to content

Commit

Permalink
python2.7 compatible kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
SteadBytes committed Jun 26, 2019
1 parent f9c1663 commit 7f64f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask_restplus/namespace.py
Expand Up @@ -58,7 +58,7 @@ def __init__(self, name, description=None, path=None, decorators=None, validate=
def path(self):
return (self._path or ('/' + self.name)).rstrip('/')

def add_resource(self, resource, *urls, route_doc=None, **kwargs):
def add_resource(self, resource, *urls, **kwargs):
'''
Register a Resource for a given API Namespace
Expand All @@ -80,7 +80,7 @@ def add_resource(self, resource, *urls, route_doc=None, **kwargs):
namespace.add_resource(Foo, '/foo', endpoint="foo")
namespace.add_resource(FooSpecial, '/special/foo', endpoint="foo")
'''
route_doc = {} if route_doc is None else route_doc
route_doc = kwargs.pop('route_doc', {})
self.resources.append(ResourceRoute(resource, urls, route_doc, kwargs))
for api in self.apis:
ns_urls = api.ns_urls(self, urls)
Expand Down

0 comments on commit 7f64f0b

Please sign in to comment.