mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-18 18:05:58 +08:00
add DoesNotExist exception to Model
This commit is contained in:
@@ -4,7 +4,7 @@ from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
|
|||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from django.core.checks.messages import Warning
|
from django.core.checks.messages import Warning
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError, ObjectDoesNotExist
|
||||||
from django.db.models.fields.related import ForeignKey
|
from django.db.models.fields.related import ForeignKey
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +40,9 @@ class ModelState:
|
|||||||
fields_cache: Any = ...
|
fields_cache: Any = ...
|
||||||
|
|
||||||
class Model:
|
class Model:
|
||||||
|
class DoesNotExist(ObjectDoesNotExist):
|
||||||
|
pass
|
||||||
|
|
||||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_db(
|
def from_db(
|
||||||
|
|||||||
@@ -96,8 +96,6 @@ class QuerySet(Generic[_T]):
|
|||||||
|
|
||||||
def as_manager(cls): ...
|
def as_manager(cls): ...
|
||||||
|
|
||||||
as_manager: Any = ...
|
|
||||||
|
|
||||||
def __deepcopy__(
|
def __deepcopy__(
|
||||||
self,
|
self,
|
||||||
memo: Dict[
|
memo: Dict[
|
||||||
|
|||||||
Reference in New Issue
Block a user