mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-05-04 12:35:49 +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`. https://github.com/django/django/blob/caad462feaa84ba78ed658a9595a4a4363dad2db/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]] = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def message_dict(self) -> Optional[Dict[str, List[str]]]: ...
|
||||
def message_dict(self) -> Dict[str, List[str]]: ...
|
||||
@property
|
||||
def messages(self) -> List[str]: ...
|
||||
def update_error_dict(self, error_dict: Dict[str, List[ValidationError]]) -> Dict[str, List[ValidationError]]: ...
|
||||
|
||||
Reference in New Issue
Block a user