mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -17,13 +17,9 @@ class SessionBase:
|
||||
def __init__(self, session_key: Optional[str] = ...) -> None: ...
|
||||
def __contains__(self, key: str) -> bool: ...
|
||||
def __getitem__(self, key: str) -> Union[Model, int, str]: ...
|
||||
def __setitem__(
|
||||
self, key: str, value: Union[datetime, Model, int, str]
|
||||
) -> None: ...
|
||||
def __setitem__(self, key: str, value: Union[datetime, Model, int, str]) -> None: ...
|
||||
def __delitem__(self, key: str) -> None: ...
|
||||
def get(
|
||||
self, key: str, default: Optional[str] = ...
|
||||
) -> Optional[Union[datetime, int, str]]: ...
|
||||
def get(self, key: str, default: Optional[str] = ...) -> Optional[Union[datetime, int, str]]: ...
|
||||
def pop(self, key: str, default: Any = ...) -> Union[int, str]: ...
|
||||
def setdefault(self, key: str, value: str) -> str: ...
|
||||
def set_test_cookie(self) -> None: ...
|
||||
|
||||
@@ -5,7 +5,6 @@ from django.contrib.sessions.base_session import AbstractBaseSession
|
||||
from django.contrib.sessions.models import Session
|
||||
from django.db.models.base import Model
|
||||
|
||||
|
||||
class SessionStore(SessionBase):
|
||||
accessed: bool
|
||||
serializer: Type[django.core.signing.JSONSerializer]
|
||||
@@ -17,9 +16,7 @@ class SessionStore(SessionBase):
|
||||
def exists(self, session_key: Optional[str]) -> bool: ...
|
||||
modified: bool = ...
|
||||
def create(self) -> None: ...
|
||||
def create_model_instance(
|
||||
self, data: Dict[str, Model]
|
||||
) -> AbstractBaseSession: ...
|
||||
def create_model_instance(self, data: Dict[str, Model]) -> AbstractBaseSession: ...
|
||||
def save(self, must_create: bool = ...) -> None: ...
|
||||
def delete(self, session_key: Optional[str] = ...) -> None: ...
|
||||
@classmethod
|
||||
|
||||
@@ -2,7 +2,6 @@ from typing import Any, Dict, Optional, Union
|
||||
|
||||
from django.contrib.sessions.backends.base import SessionBase
|
||||
|
||||
|
||||
class SessionStore(SessionBase):
|
||||
accessed: bool
|
||||
serializer: Type[django.core.signing.JSONSerializer]
|
||||
|
||||
@@ -3,7 +3,6 @@ from typing import Any, Dict, Optional, Union
|
||||
|
||||
from django.contrib.sessions.backends.base import SessionBase
|
||||
|
||||
|
||||
class SessionStore(SessionBase):
|
||||
accessed: bool
|
||||
serializer: Type[django.core.signing.JSONSerializer]
|
||||
|
||||
Reference in New Issue
Block a user