mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 14:31:56 +08:00
move django.contrib.postgres
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
from .array import * # NOQA
|
from .array import ArrayField as ArrayField
|
||||||
from .jsonb import * # NOQA
|
from .jsonb import JSONField as JSONField, JsonAdapter as JsonAdapter
|
||||||
from .ranges import * # NOQA
|
from .ranges import (
|
||||||
|
RangeField as RangeField,
|
||||||
|
IntegerRangeField as IntegerRangeField,
|
||||||
|
BigIntegerRangeField as BigIntegerRangeField,
|
||||||
|
FloatRangeField as FloatRangeField,
|
||||||
|
DateRangeField as DateRangeField,
|
||||||
|
DateTimeRangeField as DateTimeRangeField,
|
||||||
|
)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Union, TypeVar, Generic, Sequence
|
from typing import Any, Dict, List, Optional, Tuple, Union, TypeVar, Generic, Sequence
|
||||||
|
|
||||||
from django.db.models.fields import Field
|
from django.db.models.fields import Field
|
||||||
|
|
||||||
from .mixins import CheckFieldDefaultMixin
|
from .mixins import CheckFieldDefaultMixin
|
||||||
|
|
||||||
_T = TypeVar("_T", bound=Field)
|
_T = TypeVar("_T", bound=Field)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from json import JSONEncoder
|
|||||||
from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
||||||
|
|
||||||
from django.db.models import Field
|
from django.db.models import Field
|
||||||
|
|
||||||
from .mixins import CheckFieldDefaultMixin
|
from .mixins import CheckFieldDefaultMixin
|
||||||
|
|
||||||
class JsonAdapter(object):
|
class JsonAdapter(object):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, List, Optional
|
from typing import Any, List
|
||||||
|
|
||||||
class CheckFieldDefaultMixin:
|
class CheckFieldDefaultMixin:
|
||||||
def check(self, **kwargs: Any) -> List[Any]: ...
|
def check(self, **kwargs: Any) -> List[Any]: ...
|
||||||
|
|||||||
@@ -1,44 +1,27 @@
|
|||||||
from typing import Any, Optional
|
|
||||||
|
|
||||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
|
||||||
from django.db.migrations.operations.base import Operation
|
from django.db.migrations.operations.base import Operation
|
||||||
from django.db.migrations.state import ProjectState
|
|
||||||
|
|
||||||
class CreateExtension(Operation):
|
class CreateExtension(Operation):
|
||||||
reversible: bool = ...
|
reversible: bool = ...
|
||||||
name: Any = ...
|
name: str = ...
|
||||||
def __init__(self, name: str) -> None: ...
|
def __init__(self, name: str) -> None: ...
|
||||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
|
||||||
def database_forwards(
|
|
||||||
self, app_label: str, schema_editor: DatabaseSchemaEditor, from_state: ProjectState, to_state: ProjectState
|
|
||||||
) -> None: ...
|
|
||||||
def database_backwards(self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any) -> None: ...
|
|
||||||
def describe(self): ...
|
|
||||||
|
|
||||||
class BtreeGinExtension(CreateExtension):
|
class BtreeGinExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class BtreeGistExtension(CreateExtension):
|
class BtreeGistExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class CITextExtension(CreateExtension):
|
class CITextExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class CryptoExtension(CreateExtension):
|
class CryptoExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class HStoreExtension(CreateExtension):
|
class HStoreExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class TrigramExtension(CreateExtension):
|
class TrigramExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|
||||||
class UnaccentExtension(CreateExtension):
|
class UnaccentExtension(CreateExtension):
|
||||||
name: str = ...
|
|
||||||
def __init__(self) -> None: ...
|
def __init__(self) -> None: ...
|
||||||
|
|||||||
2
django-stubs/core/cache/backends/dummy.pyi
vendored
2
django-stubs/core/cache/backends/dummy.pyi
vendored
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
from typing import Any, Dict, Optional, Union, Callable
|
||||||
|
|
||||||
from django.core.cache.backends.base import BaseCache
|
from django.core.cache.backends.base import BaseCache
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user