mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 15:57:08 +08:00
Fix type annotation of message_dict. (#1073)
When message_dict is accessed, it either raises an `AttributeError` or
returns a `dict`. There is no way for it to be `Optional`.
caad462fea/django/core/exceptions.py (L170-L176)
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ class ValidationError(Exception):
|
|||||||
params: Optional[Dict[str, Any]] = ...,
|
params: Optional[Dict[str, Any]] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
@property
|
@property
|
||||||
def message_dict(self) -> Optional[Dict[str, List[str]]]: ...
|
def message_dict(self) -> Dict[str, List[str]]: ...
|
||||||
@property
|
@property
|
||||||
def messages(self) -> List[str]: ...
|
def messages(self) -> List[str]: ...
|
||||||
def update_error_dict(self, error_dict: Dict[str, List[ValidationError]]) -> Dict[str, List[ValidationError]]: ...
|
def update_error_dict(self, error_dict: Dict[str, List[ValidationError]]) -> Dict[str, List[ValidationError]]: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user