Skip to content

Commit

Permalink
Fixed create_model_instance incorrect data argument type (#1521)
Browse files Browse the repository at this point in the history
* Fixed `create_model_instance` incorrect data argument type

Session data is dynamic and it doesn't have Model values

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
namper and pre-commit-ci[bot] authored Jun 2, 2023
1 parent 21e541f commit b3dab8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django-stubs/contrib/sessions/backends/db.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from typing import Any

from django.contrib.sessions.backends.base import SessionBase
from django.contrib.sessions.base_session import AbstractBaseSession
from django.db.models.base import Model

class SessionStore(SessionBase):
def __init__(self, session_key: str | None = ...) -> None: ...
@classmethod
def get_model_class(cls) -> type[AbstractBaseSession]: ...
@property
def model(self) -> type[AbstractBaseSession]: ...
def create_model_instance(self, data: dict[str, Model]) -> AbstractBaseSession: ...
def create_model_instance(self, data: dict[str, Any]) -> AbstractBaseSession: ...

0 comments on commit b3dab8e

Please sign in to comment.