Skip to content

Commit 168450c

Browse files
committed
chores: Run formatter
1 parent 11fca6d commit 168450c

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

tests/Django/test_django.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@
1919

2020
from django.http import HttpRequest, HttpResponse, JsonResponse
2121
from django.test import RequestFactory, TestCase
22-
from pytest import mark
2322
from supertokens_python import InputAppInfo, SupertokensConfig, init
2423
from supertokens_python.framework.django import middleware
2524
from supertokens_python.recipe import emailpassword, session
26-
from supertokens_python.recipe.emailpassword.interfaces import (APIInterface,
27-
APIOptions)
25+
from supertokens_python.recipe.emailpassword.interfaces import APIInterface, APIOptions
2826
from supertokens_python.recipe.session import SessionContainer
29-
from supertokens_python.recipe.session.asyncio import (create_new_session,
30-
get_session,
31-
refresh_session)
32-
from supertokens_python.recipe.session.framework.django.asyncio import \
33-
verify_session
27+
from supertokens_python.recipe.session.asyncio import (
28+
create_new_session,
29+
get_session,
30+
refresh_session,
31+
)
32+
from supertokens_python.recipe.session.framework.django.asyncio import verify_session
3433
from tests.utils import clean_st, reset, setup_st, start_st
3534

3635

@@ -393,8 +392,9 @@ async def test_optional_session(self):
393392

394393

395394
from django.http import HttpResponse
396-
from supertokens_python.framework.django.django_response import \
397-
DjangoResponse as SuperTokensDjangoWrapper
395+
from supertokens_python.framework.django.django_response import (
396+
DjangoResponse as SuperTokensDjangoWrapper,
397+
)
398398

399399

400400
class SupertokensResponseTest(TestCase):

tests/Flask/test_flask.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,12 @@ def test_optional_session(driver_config_app: Any):
399399
assert response.status_code == 200
400400
assert dict_response["s"] == "empty session"
401401

402-
from flask import Response
403-
from supertokens_python.framework.flask.flask_response import FlaskResponse as SupertokensFlaskWrapper
402+
403+
from flask.wrappers import Response
404+
from supertokens_python.framework.flask.flask_response import (
405+
FlaskResponse as SupertokensFlaskWrapper,
406+
)
407+
404408

405409
def test_remove_header_works():
406410
response = Response()

tests/utils.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,12 @@ def extract_info(response: Response) -> Dict[str, Any]:
252252
"antiCsrf": response.headers.get("anti-csrf"),
253253
"accessTokenFromHeader": access_token_from_header,
254254
"refreshTokenFromHeader": refresh_token_from_header,
255-
"accessTokenFromAny": access_token_from_header if access_token is None else access_token,
256-
"refreshTokenFromAny": refresh_token_from_header if refresh_token is None else refresh_token,
255+
"accessTokenFromAny": access_token_from_header
256+
if access_token is None
257+
else access_token,
258+
"refreshTokenFromAny": refresh_token_from_header
259+
if refresh_token is None
260+
else refresh_token,
257261
}
258262

259263

@@ -517,15 +521,13 @@ async def __call__( # pylint: disable=invalid-overridden-method, useless-super-
517521
}
518522

519523

520-
def get_st_init_args(recipe_list: List[Any], extra_config: Optional[Dict[str, Any]]=None) -> Dict[str, Any]:
524+
def get_st_init_args(
525+
recipe_list: List[Any], extra_config: Optional[Dict[str, Any]] = None
526+
) -> Dict[str, Any]:
521527
if extra_config is None:
522528
extra_config = {}
523529

524-
return {
525-
**st_init_common_args,
526-
"recipe_list": recipe_list,
527-
**extra_config
528-
}
530+
return {**st_init_common_args, "recipe_list": recipe_list, **extra_config}
529531

530532

531533
def is_subset(dict1: Any, dict2: Any) -> bool:

0 commit comments

Comments
 (0)