better stubs

This commit is contained in:
Maxim Kurnikov
2018-08-05 03:13:19 +03:00
parent 4013fe4d03
commit fa718b8e55
380 changed files with 11805 additions and 8503 deletions

View File

@@ -1,22 +1,18 @@
# Stubs for django.db.transaction (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from contextlib import ContextDecorator
from django.db import ProgrammingError
from typing import Any, Optional
from typing import Any, Callable, Optional, Union
from django.db import ProgrammingError
from django.db.backends.sqlite3.base import DatabaseWrapper
from typing import Callable, Optional, Union
class TransactionManagementError(ProgrammingError): ...
def get_connection(using: Optional[str] = ...) -> DatabaseWrapper: ...
def get_autocommit(using: str = ...) -> bool: ...
def set_autocommit(autocommit: Any, using: Optional[Any] = ...): ...
def commit(using: None = ...) -> None: ...
def rollback(using: Optional[Any] = ...) -> None: ...
def savepoint(using: Optional[Any] = ...): ...
def get_autocommit(using: Optional[str] = ...) -> bool: ...
def set_autocommit(autocommit: bool, using: None = ...) -> Any: ...
def commit(using: None = ...) -> Any: ...
def rollback(using: None = ...) -> Any: ...
def savepoint(using: None = ...) -> str: ...
def savepoint_rollback(sid: str, using: None = ...) -> None: ...
def savepoint_commit(sid: Any, using: Optional[Any] = ...) -> None: ...
def clean_savepoints(using: Optional[Any] = ...) -> None: ...
@@ -25,14 +21,15 @@ def set_rollback(rollback: bool, using: Optional[str] = ...) -> None: ...
def on_commit(func: Callable, using: None = ...) -> None: ...
class Atomic(ContextDecorator):
using: Any = ...
savepoint: Any = ...
using: Optional[str] = ...
savepoint: bool = ...
def __init__(self, using: Optional[str], savepoint: bool) -> None: ...
def __enter__(self) -> None: ...
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
def __exit__(
self, exc_type: None, exc_value: None, traceback: None
) -> None: ...
def atomic(
using: Optional[Union[str, Callable]] = ..., savepoint: bool = ...
using: Optional[Union[Callable, str]] = ..., savepoint: bool = ...
) -> Callable: ...
def _non_atomic_requests(view: Any, using: Any): ...
def non_atomic_requests(using: Callable = ...) -> Callable: ...