mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 04:04:26 +08:00
Cleanup checks framework (#310)
This commit is contained in:
committed by
GitHub
parent
438f8b5829
commit
f89a0fbbaa
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user