run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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]

View File

@@ -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]