Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
김정근 committed Apr 27, 2020
1 parent fb37c7b commit d0a3f77
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

# F401 imported but unused

ignore=F401
ignore=F401, E722

max-line-length=140

exclude =
./docs
./venv
./tests
migrations
4 changes: 2 additions & 2 deletions ridi_django_oauth2/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RESPONSE_HANDLER_TYPE = typing.Optional[typing.Callable]


def login_required(response_handler: RESPONSE_HANDLER_TYPE=None):
def login_required(response_handler: RESPONSE_HANDLER_TYPE = None):
def decorator(func):
def wrapper(self, request, *args, **kwargs):
user = request.user
Expand All @@ -25,7 +25,7 @@ def wrapper(self, request, *args, **kwargs):
return decorator


def scope_required(required_scopes: typing.List, response_handler: RESPONSE_HANDLER_TYPE=None):
def scope_required(required_scopes: typing.List, response_handler: RESPONSE_HANDLER_TYPE = None):
def decorator(func):
def wrapper(self, request, *args, **kwargs):
token_info = request.user.token_info
Expand Down
2 changes: 1 addition & 1 deletion ridi_oauth2/client/grant.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _request_token(self, data: typing.Dict) -> TokenData:
)

@classmethod
def _request(cls, method: str, url: str, data: typing.Dict, headers: typing.Dict=None) -> TokenData:
def _request(cls, method: str, url: str, data: typing.Dict, headers: typing.Dict = None) -> TokenData:
try:
response = requests.request(method=method, url=url, data=data, headers=headers)
response.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion ridi_oauth2/introspector/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class BaseIntrospector:
def __init__(self, access_token: str, token_type_hint: str=None):
def __init__(self, access_token: str, token_type_hint: str = None):
self._access_token = access_token
self._token_type_hint = token_type_hint

Expand Down
4 changes: 2 additions & 2 deletions tests/tests_ridi_django_oauth2/test_token_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

def generate_ec_private_key():
return ec.generate_private_key(
curve=ec.SECP256R1,
backend=default_backend()
curve=ec.SECP256R1,
backend=default_backend()
)


Expand Down

0 comments on commit d0a3f77

Please sign in to comment.