Skip to content

Commit

Permalink
Fix typos and imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
airstandley committed Sep 17, 2019
1 parent a063130 commit 3a2ba26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions flask_rebar/swagger_generation/authenticator_to_swagger.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from collections import namedtuple

from flask_rebar.utils.deprecation import deprecated, deprecated_parameters
from flask_rebar.authenticators import (
HeaderApiKeyAuthenticator,
USE_DEFAULT,
Authenticator,
)
from flask_rebar.authenticators import HeaderApiKeyAuthenticator, Authenticator
from .marshmallow_to_swagger import ConverterRegistry
from . import swagger_words as sw

Expand Down Expand Up @@ -66,7 +62,7 @@ class HeaderApiKeyConverter(AuthenticatorConverter):

def get_security_requirements(self, obj, context):
"""
:param HeaderApiLeyAuthenticator obj:
:param HeaderApiKeyAuthenticator obj:
:param _Context context:
:return: list
"""
Expand Down
10 changes: 5 additions & 5 deletions flask_rebar/swagger_generation/generator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@
from collections import namedtuple, OrderedDict

from flask_rebar.utils.deprecation import deprecated
from flask_rebar.authenticators import HeaderApiKeyAuthenticator, USE_DEFAULT
from flask_rebar.utils.defaults import USE_DEFAULT
from flask_rebar.swagger_generation import swagger_words as sw
from flask_rebar.swagger_generation.marshmallow_to_swagger import get_swagger_title
from flask_rebar.swagger_generation.authenticator_to_swagger import (
AuthenticatorConverterRegistry,
)


AuthenticatorConverter = AuthenticatorConverterRegistry # deprecated alias


def get_key(obj):
"""
Returns the key for a JSONSchema object that we can use to make a $ref.
Expand Down Expand Up @@ -191,7 +188,7 @@ def convert_header_api_key_authenticator(authenticator):
"""
Converts a HeaderApiKeyAuthenticator object to a Swagger definition.
:param HeaderApiKeyAuthenticator authenticator:
:param flask_rebar.authenticators.HeaderApiKeyAuthenticator authenticator:
:rtype: tuple(str, dict)
:returns: Tuple where the first item is a name for the authenticator, and
the second item is a Swagger definition for it.
Expand Down Expand Up @@ -305,3 +302,6 @@ def recursively_convert_dict_to_ordered_dict(obj):
return [recursively_convert_dict_to_ordered_dict(item) for item in obj]
else:
return obj


AuthenticatorConverter = AuthenticatorConverterRegistry # deprecated alias

0 comments on commit 3a2ba26

Please sign in to comment.