diff --git a/django-stubs/core/checks/__init__.pyi b/django-stubs/core/checks/__init__.pyi index 07ea91c..a41eed9 100644 --- a/django-stubs/core/checks/__init__.pyi +++ b/django-stubs/core/checks/__init__.pyi @@ -1,5 +1,17 @@ -from .messages import Warning as Warning, Info as Info, Debug as Debug, Error as Error, Critical as Critical +from .messages import ( + CheckMessage as CheckMessage, + Debug as Debug, + Info as Info, + Warning as Warning, + Error as Error, + Critical as Critical, + DEBUG as DEBUG, + INFO as INFO, + WARNING as WARNING, + ERROR as ERROR, + CRITICAL as CRITICAL, +) -from .registry import run_checks as run_checks, Tags as Tags, register as register +from .registry import register as register, run_checks as run_checks, tag_exists as tag_exists, Tags as Tags from . import model_checks as model_checks diff --git a/django-stubs/core/checks/messages.pyi b/django-stubs/core/checks/messages.pyi index 5a19783..f7aec38 100644 --- a/django-stubs/core/checks/messages.pyi +++ b/django-stubs/core/checks/messages.pyi @@ -7,11 +7,11 @@ ERROR: int CRITICAL: int class CheckMessage: - level: Any = ... - msg: Any = ... - hint: Any = ... + level: int = ... + msg: str = ... + hint: Optional[str] = ... obj: Any = ... - id: Any = ... + id: Optional[str] = ... def __init__( self, level: int, msg: str, hint: Optional[str] = ..., obj: Any = ..., id: Optional[str] = ... ) -> None: ... @@ -25,19 +25,9 @@ class Info(CheckMessage): def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Warning(CheckMessage): - hint: str - id: str - level: int - msg: str - obj: Any def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Error(CheckMessage): - hint: None - id: str - level: int - msg: str - obj: Any def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Critical(CheckMessage):