Skip to content

Commit 76169e2

Browse files
committed
update: remove __future__ annotations from webauthn
1 parent 81d5e69 commit 76169e2

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

supertokens_python/recipe/webauthn/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
14-
from __future__ import annotations
15-
1614
from supertokens_python.exceptions import SuperTokensError
1715

1816

supertokens_python/recipe/webauthn/interfaces/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from abc import ABC, abstractmethod
42
from typing import TYPE_CHECKING, List, Literal, Optional, TypedDict, Union
53

supertokens_python/recipe/webauthn/recipe.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import os
42
from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast
53

@@ -63,10 +61,15 @@
6361

6462
if TYPE_CHECKING:
6563
from supertokens_python.auth_utils import is_fake_email
64+
from supertokens_python.recipe.webauthn.interfaces.api import (
65+
ApiInterface,
66+
APIOptions,
67+
TypeWebauthnEmailDeliveryInput,
68+
)
6669

6770

6871
class WebauthnRecipe(RecipeModule):
69-
__instance: Optional[WebauthnRecipe] = None
72+
__instance: Optional["WebauthnRecipe"] = None
7073
recipe_id = "webauthn"
7174

7275
config: NormalisedWebauthnConfig
@@ -277,15 +280,15 @@ async def get_emails_for_factor(
277280
PostSTInitCallbacks.add_post_init_callback(callback)
278281

279282
@staticmethod
280-
def get_instance() -> WebauthnRecipe:
283+
def get_instance() -> "WebauthnRecipe":
281284
if WebauthnRecipe.__instance is not None:
282285
return WebauthnRecipe.__instance
283286
raise_general_exception(
284287
"Initialisation not done. Did you forget to call the SuperTokens.init function?"
285288
)
286289

287290
@staticmethod
288-
def get_instance_optional() -> Optional[WebauthnRecipe]:
291+
def get_instance_optional() -> Optional["WebauthnRecipe"]:
289292
return WebauthnRecipe.__instance
290293

291294
@staticmethod
@@ -370,6 +373,7 @@ async def handle_api_request(
370373
response: BaseResponse,
371374
user_context: UserContext,
372375
) -> Optional[BaseResponse]:
376+
APIOptions.model_rebuild()
373377
options = APIOptions(
374378
config=self.config,
375379
recipe_id=self.get_recipe_id(),

supertokens_python/recipe/webauthn/types/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Any, Dict, List
42

53
from typing_extensions import TypeAlias

supertokens_python/recipe/webauthn/types/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Optional, Protocol, TypeVar, Union, runtime_checkable
42

53
from supertokens_python.framework import BaseRequest

0 commit comments

Comments
 (0)