Skip to content

Commit 58a8eca

Browse files
committed
reset unwanted changes
1 parent dc3fd43 commit 58a8eca

File tree

8 files changed

+11
-15
lines changed

8 files changed

+11
-15
lines changed

supertokens_python/recipe/dashboard/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
from supertokens_python import AppInfo, RecipeModule
2121
from supertokens_python.recipe.dashboard.utils import InputOverrideConfig
2222

23+
from .recipe import DashboardRecipe
24+
2325

2426
def init(
2527
api_key: Union[str, None] = None,
2628
override: Optional[InputOverrideConfig] = None,
2729
) -> Callable[[AppInfo], RecipeModule]:
28-
# Global import for the following was avoided because of circular import errors
29-
from .recipe import DashboardRecipe
30-
3130
return DashboardRecipe.init(
3231
api_key,
3332
override,

supertokens_python/recipe/dashboard/recipe_implementation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def should_allow_access(
3434
config: DashboardConfig,
3535
user_context: Dict[str, Any],
3636
) -> bool:
37-
if not config.api_key:
37+
if config.auth_mode == "email-password":
3838
auth_header_value = request.get_header("authorization")
3939

4040
if not auth_header_value:

supertokens_python/recipe/emailverification/interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
from supertokens_python.ingredients.emaildelivery import EmailDeliveryIngredient
2020
from supertokens_python.types import APIResponse, GeneralErrorResponse
2121

22+
from ...supertokens import AppInfo
2223
from ..session.interfaces import SessionContainer
2324

2425
if TYPE_CHECKING:
2526
from supertokens_python.framework import BaseRequest, BaseResponse
2627

27-
from ...supertokens import AppInfo
2828
from .types import User, VerificationEmailTemplateVars
2929
from .utils import EmailVerificationConfig
3030

supertokens_python/recipe/passwordless/interfaces.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from __future__ import annotations
1515

1616
from abc import ABC, abstractmethod
17-
from typing import TYPE_CHECKING, Any, Dict, List, Union
17+
from typing import Any, Dict, List, Union
1818

1919
from typing_extensions import Literal
2020

@@ -23,6 +23,8 @@
2323
from supertokens_python.recipe.session import SessionContainer
2424
from supertokens_python.types import APIResponse, GeneralErrorResponse
2525

26+
from ...supertokens import AppInfo
27+
2628
# if TYPE_CHECKING:
2729
from .types import (
2830
DeviceType,
@@ -33,9 +35,6 @@
3335
)
3436
from .utils import PasswordlessConfig
3537

36-
if TYPE_CHECKING:
37-
from ...supertokens import AppInfo
38-
3938

4039
class CreateCodeOkResult:
4140
def __init__(

tests/auth-react/django3x/mysite/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
thirdpartypasswordless,
1717
userroles,
1818
)
19-
from supertokens_python.recipe.dashboard.recipe import DashboardRecipe
19+
from supertokens_python.recipe.dashboard import DashboardRecipe
2020
from supertokens_python.recipe.emailpassword import EmailPasswordRecipe
2121
from supertokens_python.recipe.emailpassword.interfaces import (
2222
APIInterface as EmailPasswordAPIInterface,

tests/auth-react/fastapi-server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
thirdpartypasswordless,
4747
userroles,
4848
)
49-
from supertokens_python.recipe.dashboard.recipe import DashboardRecipe
49+
from supertokens_python.recipe.dashboard import DashboardRecipe
5050
from supertokens_python.recipe.emailpassword import EmailPasswordRecipe
5151
from supertokens_python.recipe.emailpassword.interfaces import (
5252
APIInterface as EmailPasswordAPIInterface,

tests/auth-react/flask-server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
thirdpartypasswordless,
3939
userroles,
4040
)
41-
from supertokens_python.recipe.dashboard.recipe import DashboardRecipe
41+
from supertokens_python.recipe.dashboard import DashboardRecipe
4242
from supertokens_python.recipe.emailpassword import EmailPasswordRecipe
4343
from supertokens_python.recipe.emailpassword.interfaces import (
4444
APIInterface as EmailPasswordAPIInterface,

tests/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from supertokens_python import InputAppInfo, Supertokens, SupertokensConfig
3030
from supertokens_python.process_state import ProcessState
31-
from supertokens_python.recipe.dashboard.recipe import DashboardRecipe
31+
from supertokens_python.recipe.dashboard import DashboardRecipe
3232
from supertokens_python.recipe.emailpassword import EmailPasswordRecipe
3333
from supertokens_python.recipe.emailverification import EmailVerificationRecipe
3434
from supertokens_python.recipe.jwt import JWTRecipe
@@ -476,7 +476,6 @@ def min_api_version(min_version: str) -> Any:
476476
"""
477477
Skips the test if the local ST core doesn't satisfy
478478
version requirements for the tests.
479-
480479
Fetches the core version only once throughout the testing session.
481480
"""
482481

@@ -528,7 +527,6 @@ def get_st_init_args(recipe_list: List[Any]) -> Dict[str, Any]:
528527

529528
def is_subset(dict1: Any, dict2: Any) -> bool:
530529
"""Check if dict2 is subset of dict1 in a nested manner
531-
532530
Iteratively compares list items with recursion if key's value is a list
533531
"""
534532
if isinstance(dict1, list):

0 commit comments

Comments
 (0)