From 897588bd78fc58e3477d395ddd82a56df4773e00 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Fri, 25 Oct 2024 12:05:02 +0530 Subject: [PATCH] more fixes --- .../recipe/dashboard/api/userroles/get_role_to_user.py | 4 ++-- .../api/userroles/permissions/get_permissions_for_role.py | 4 ++-- .../recipe/dashboard/api/userroles/roles/get_all_roles.py | 4 ++-- supertokens_python/recipe/dashboard/utils.py | 3 ++- tests/auth-react/django3x/mysite/store.py | 3 ++- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/supertokens_python/recipe/dashboard/api/userroles/get_role_to_user.py b/supertokens_python/recipe/dashboard/api/userroles/get_role_to_user.py index 2cbd79bb..3006c1b9 100644 --- a/supertokens_python/recipe/dashboard/api/userroles/get_role_to_user.py +++ b/supertokens_python/recipe/dashboard/api/userroles/get_role_to_user.py @@ -1,4 +1,4 @@ -from typing import Any, Union +from typing import Any, Union, List from typing_extensions import Literal from supertokens_python.exceptions import raise_bad_input_exception from supertokens_python.recipe.dashboard.interfaces import APIInterface, APIOptions @@ -8,7 +8,7 @@ class OkResponse(APIResponse): - def __init__(self, roles: list[str]): + def __init__(self, roles: List[str]): self.status: Literal["OK"] = "OK" self.roles = roles diff --git a/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py b/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py index 670c98f5..bab61e04 100644 --- a/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py +++ b/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Union +from typing import Any, Dict, Union, List from supertokens_python.exceptions import raise_bad_input_exception from supertokens_python.recipe.dashboard.interfaces import APIInterface, APIOptions from supertokens_python.recipe.userroles.asyncio import get_permissions_for_role @@ -12,7 +12,7 @@ class OkPermissionsForRoleResponse(APIResponse): - def __init__(self, permissions: list[str]): + def __init__(self, permissions: List[str]): self.status = "OK" self.permissions = permissions diff --git a/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py b/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py index 35fca684..71dc11d2 100644 --- a/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py +++ b/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py @@ -1,4 +1,4 @@ -from typing import Any, Union +from typing import Any, Union, List from typing_extensions import Literal from supertokens_python.recipe.dashboard.interfaces import APIInterface, APIOptions from supertokens_python.recipe.userroles.asyncio import get_all_roles @@ -7,7 +7,7 @@ class OkResponse(APIResponse): - def __init__(self, roles: list[str]): + def __init__(self, roles: List[str]): self.status: Literal["OK"] = "OK" self.roles = roles diff --git a/supertokens_python/recipe/dashboard/utils.py b/supertokens_python/recipe/dashboard/utils.py index ba7eae3b..e05e5384 100644 --- a/supertokens_python/recipe/dashboard/utils.py +++ b/supertokens_python/recipe/dashboard/utils.py @@ -13,7 +13,8 @@ # under the License. from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, List, Literal +from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, List +from typing_extensions import Literal from supertokens_python.recipe.accountlinking.recipe import AccountLinkingRecipe if TYPE_CHECKING: diff --git a/tests/auth-react/django3x/mysite/store.py b/tests/auth-react/django3x/mysite/store.py index 07da199b..3f2ece28 100644 --- a/tests/auth-react/django3x/mysite/store.py +++ b/tests/auth-react/django3x/mysite/store.py @@ -1,4 +1,5 @@ -from typing import Any, Dict, List, Literal, Optional, Union +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Literal latest_url_with_token = ""