mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 10:21:14 +08:00
merge with stubgen output
This commit is contained in:
@@ -1,78 +1,40 @@
|
||||
from datetime import (
|
||||
date,
|
||||
time,
|
||||
)
|
||||
# Stubs for django.db.backends.utils (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from datetime import date, time
|
||||
from decimal import Decimal
|
||||
from django.db.backends.sqlite3.base import (
|
||||
DatabaseWrapper,
|
||||
SQLiteCursorWrapper,
|
||||
)
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
def format_number(
|
||||
value: Optional[Decimal],
|
||||
max_digits: Optional[int],
|
||||
decimal_places: Optional[int]
|
||||
) -> Optional[str]: ...
|
||||
|
||||
|
||||
def rev_typecast_decimal(d: Decimal) -> str: ...
|
||||
|
||||
|
||||
def split_identifier(identifier: str) -> Tuple[str, str]: ...
|
||||
|
||||
|
||||
def strip_quotes(table_name: str) -> str: ...
|
||||
|
||||
|
||||
def truncate_name(identifier: str, length: Optional[int] = ..., hash_len: int = ...) -> str: ...
|
||||
|
||||
|
||||
def typecast_date(s: str) -> date: ...
|
||||
|
||||
|
||||
def typecast_time(s: str) -> Optional[time]: ...
|
||||
|
||||
|
||||
def typecast_timestamp(s: str) -> date: ...
|
||||
|
||||
|
||||
class CursorDebugWrapper:
|
||||
def execute(self, sql: str, params: Optional[Union[List[str], Tuple]] = ...): ...
|
||||
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper, SQLiteCursorWrapper
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
||||
logger: Any
|
||||
|
||||
class CursorWrapper:
|
||||
cursor: Any = ...
|
||||
db: Any = ...
|
||||
def __init__(self, cursor: SQLiteCursorWrapper, db: DatabaseWrapper) -> None: ...
|
||||
WRAP_ERROR_ATTRS: Any = ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
def __iter__(self) -> None: ...
|
||||
def __enter__(self) -> CursorWrapper: ...
|
||||
def __exit__(self, type: None, value: None, traceback: None) -> None: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
def __init__(
|
||||
self,
|
||||
cursor: SQLiteCursorWrapper,
|
||||
db: DatabaseWrapper
|
||||
) -> None: ...
|
||||
def __iter__(self) -> None: ...
|
||||
def _execute(self, sql: str, params: Any, *ignored_wrapper_args): ...
|
||||
def _execute_with_wrappers(
|
||||
self,
|
||||
sql: str,
|
||||
params: Any,
|
||||
many: bool,
|
||||
executor: Callable
|
||||
) -> Optional[SQLiteCursorWrapper]: ...
|
||||
def _executemany(
|
||||
self,
|
||||
sql: str,
|
||||
param_list: Union[List[Tuple[int]], List[Tuple[int, int, int]]],
|
||||
*ignored_wrapper_args
|
||||
): ...
|
||||
def callproc(self, procname: str, params: List[Any] = ..., kparams: Dict[str, int] = ...): ...
|
||||
def execute(self, sql: str, params: Any = ...) -> SQLiteCursorWrapper: ...
|
||||
def execute(self, sql: str, params: Any = ...) -> SQLiteCursorWrapper: ...
|
||||
def executemany(self, sql: Any, param_list: Any): ...
|
||||
def _execute_with_wrappers(self, sql: str, params: Any, many: bool, executor: Callable) -> Optional[SQLiteCursorWrapper]: ...
|
||||
def _execute(self, sql: str, params: Any, *ignored_wrapper_args: Any): ...
|
||||
def _executemany(self, sql: str, param_list: Union[List[Tuple[int]], List[Tuple[int, int, int]]], *ignored_wrapper_args: Any): ...
|
||||
|
||||
class CursorDebugWrapper(CursorWrapper):
|
||||
def execute(self, sql: str, params: Optional[Union[List[str], Tuple]] = ...): ...
|
||||
def executemany(self, sql: Any, param_list: Any): ...
|
||||
|
||||
def typecast_date(s: str) -> date: ...
|
||||
def typecast_time(s: str) -> Optional[time]: ...
|
||||
def typecast_timestamp(s: str) -> date: ...
|
||||
def rev_typecast_decimal(d: Decimal) -> str: ...
|
||||
def split_identifier(identifier: str) -> Tuple[str, str]: ...
|
||||
def truncate_name(identifier: str, length: Optional[int] = ..., hash_len: int = ...) -> str: ...
|
||||
def format_number(value: Optional[Decimal], max_digits: Optional[int], decimal_places: Optional[int]) -> Optional[str]: ...
|
||||
def strip_quotes(table_name: str) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user