mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
cleanups
This commit is contained in:
@@ -2,8 +2,8 @@ import collections
|
||||
from collections import OrderedDict, namedtuple
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Sequence, Set, Tuple, Type, Union
|
||||
|
||||
from django.db.models.lookups import Lookup
|
||||
from django.db.models.query_utils import PathInfo
|
||||
from django.db.models.lookups import Lookup, Transform
|
||||
from django.db.models.query_utils import PathInfo, RegisterLookupMixin
|
||||
from django.db.models.sql.compiler import SQLCompiler
|
||||
from django.db.models.sql.datastructures import BaseTable
|
||||
from django.db.models.sql.where import WhereNode
|
||||
@@ -69,6 +69,8 @@ class Query:
|
||||
explain_query: bool = ...
|
||||
explain_format: Optional[str] = ...
|
||||
explain_options: Dict[str, int] = ...
|
||||
high_mark: Optional[int] = ...
|
||||
low_mark: int = ...
|
||||
def __init__(self, model: Optional[Type[Model]], where: Type[WhereNode] = ...) -> None: ...
|
||||
@property
|
||||
def extra(self) -> OrderedDict: ...
|
||||
@@ -141,8 +143,6 @@ class Query:
|
||||
) -> Tuple[WhereNode, Tuple]: ...
|
||||
def set_empty(self) -> None: ...
|
||||
def is_empty(self) -> bool: ...
|
||||
high_mark: Optional[int] = ...
|
||||
low_mark: int = ...
|
||||
def set_limits(self, low: Optional[int] = ..., high: Optional[int] = ...) -> None: ...
|
||||
def clear_limits(self) -> None: ...
|
||||
def has_limit_one(self) -> bool: ...
|
||||
@@ -178,7 +178,10 @@ class Query:
|
||||
def set_values(self, fields: Union[List[str], Tuple]) -> None: ...
|
||||
def trim_start(self, names_with_path: List[Tuple[str, List[PathInfo]]]) -> Tuple[str, bool]: ...
|
||||
def is_nullable(self, field: Field) -> bool: ...
|
||||
def build_lookup(self, lookups: Sequence[str], lhs: Query, rhs: Optional[Query]) -> Lookup: ...
|
||||
def build_lookup(
|
||||
self, lookups: Sequence[str], lhs: Union[RegisterLookupMixin, Query], rhs: Optional[Query]
|
||||
) -> Lookup: ...
|
||||
def try_transform(self, lhs: Union[RegisterLookupMixin, Query], name: str) -> Transform: ...
|
||||
|
||||
class JoinPromoter:
|
||||
connector: str = ...
|
||||
|
||||
Reference in New Issue
Block a user