Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PartialMixin.next_step type annotation #1023

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions social_core/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import uuid
from abc import abstractmethod
from datetime import datetime, timedelta, timezone
from typing import Any

from openid.association import Association as OpenIdAssociation

Expand All @@ -20,7 +21,6 @@ class UserMixin:
# Consider tokens that expire in 5 seconds as already expired
ACCESS_TOKEN_EXPIRED_THRESHOLD = 5

user = ""
provider = ""
uid = None
extra_data = None
Expand Down Expand Up @@ -292,8 +292,8 @@ def get_code(cls, code):

class PartialMixin:
token = ""
data = {}
next_step = ""
data: dict[str, Any] = {}
next_step: int
backend = ""

@property
Expand Down Expand Up @@ -328,7 +328,7 @@ def destroy(cls, token):
raise NotImplementedError("Implement in subclass")

@classmethod
def prepare(cls, backend, next_step, data):
def prepare(cls, backend, next_step: int, data: dict[str, Any]):
partial = cls()
partial.backend = backend
partial.next_step = next_step
Expand Down
Loading