fixes, add some testing folders

This commit is contained in:
Maxim Kurnikov
2019-02-04 19:31:37 +03:00
parent 3dcab64e07
commit 69d4ccaf54
31 changed files with 319 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
from contextlib import ContextDecorator
from typing import Any, Callable, Optional, Union, ContextManager
from typing import Any, Callable, Optional, Union, Iterator, overload, ContextManager
from django.db import ProgrammingError
@@ -25,5 +25,12 @@ class Atomic(ContextDecorator):
def __enter__(self) -> None: ...
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
def atomic(using: Optional[Union[Callable, str]] = ..., savepoint: bool = ...) -> ContextManager[Atomic]: ...
@overload
def atomic() -> Atomic: ...
@overload
def atomic(using: Optional[str] = ...,) -> ContextManager[Atomic]: ...
@overload
def atomic(using: Callable = ...) -> Callable: ...
@overload
def atomic(using: Optional[str] = ..., savepoint: bool = ...) -> ContextManager[Atomic]: ...
def non_atomic_requests(using: Callable = ...) -> Callable: ...