diff --git a/django-stubs/core/checks/registry.pyi b/django-stubs/core/checks/registry.pyi index 12c560e..aa42e54 100644 --- a/django-stubs/core/checks/registry.pyi +++ b/django-stubs/core/checks/registry.pyi @@ -15,17 +15,19 @@ class Tags: translation: str = ... urls: str = ... +_CheckCallable = Callable[..., List[CheckMessage]] + class CheckRegistry: registered_checks: Set[Callable] = ... deployment_checks: Set[Callable] = ... def __init__(self) -> None: ... - def register(self, check: Optional[Union[Callable, str]] = ..., *tags: Any, **kwargs: Any) -> Callable: ... + def register(self, check: Optional[Union[_CheckCallable, str]] = ..., *tags: str, **kwargs: Any) -> Callable: ... def run_checks( self, app_configs: Optional[List[AppConfig]] = ..., tags: Optional[List[str]] = ..., include_deployment_checks: bool = ..., - ) -> Union[List[CheckMessage], List[int], List[str]]: ... + ) -> List[CheckMessage]: ... def tag_exists(self, tag: str, include_deployment_checks: bool = ...) -> bool: ... def tags_available(self, deployment_checks: bool = ...) -> Set[str]: ... def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ...