mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 20:24:31 +08:00
Add RESTRICT and RestrictedError to django.db.models.deletion (#345)
* Add RESTRICT and RestrictedError to django.db.models.deletion * Add black fomatting changes
This commit is contained in:
@@ -68,6 +68,9 @@ from .deletion import (
|
||||
DO_NOTHING as DO_NOTHING,
|
||||
PROTECT as PROTECT,
|
||||
SET as SET,
|
||||
RESTRICT as RESTRICT,
|
||||
ProtectedError as ProtectedError,
|
||||
RestrictedError as RestrictedError,
|
||||
)
|
||||
|
||||
from .query import (
|
||||
|
||||
@@ -11,10 +11,12 @@ def SET_NULL(collector, field, sub_objs, using): ...
|
||||
def SET_DEFAULT(collector, field, sub_objs, using): ...
|
||||
def DO_NOTHING(collector, field, sub_objs, using): ...
|
||||
def PROTECT(collector, field, sub_objs, using): ...
|
||||
def RESTRICT(collector, field, sub_objs, using): ...
|
||||
def SET(value: Any) -> Callable: ...
|
||||
def get_candidate_relations_to_delete(opts: Options) -> Iterable[Field]: ...
|
||||
|
||||
class ProtectedError(IntegrityError): ...
|
||||
class RestrictedError(IntegrityError): ...
|
||||
|
||||
class Collector:
|
||||
def __init__(self, using: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user