Skip to content

Commit d5cc944

Browse files
authored
Expand CheckRegistry.register as function (#2232) (#2233)
1 parent 1947e1e commit d5cc944

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

django-stubs/core/checks/registry.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ class CheckRegistry:
4242
deployment_checks: set[_ProcessedCheckCallable]
4343
def __init__(self) -> None: ...
4444
@overload
45-
def register(self, check: _C, /) -> _ProcessedCheckCallable[_C]: ...
45+
def register(self, check: _C, *tags: str, **kwargs: Any) -> _ProcessedCheckCallable[_C]: ...
4646
@overload
47-
def register(self, *tags: str, **kwargs: Any) -> Callable[[_C], _ProcessedCheckCallable[_C]]: ...
47+
def register(
48+
self, check: str | None = None, *tags: str, **kwargs: Any
49+
) -> Callable[[_C], _ProcessedCheckCallable[_C]]: ...
4850
def run_checks(
4951
self,
5052
app_configs: Sequence[AppConfig] | None = ...,

scripts/stubtest/allowlist_todo.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ django.contrib.staticfiles.finders.BaseStorageFinder.storage
517517
django.contrib.staticfiles.finders.DefaultStorageFinder.storage
518518
django.contrib.staticfiles.storage.staticfiles_storage
519519
django.core.cache.cache
520-
django.core.checks.registry.CheckRegistry.register
521520
django.core.files.locks.OVERLAPPED
522521
django.core.files.locks.PVOID
523522
django.core.files.locks.ULONG_PTR

0 commit comments

Comments
 (0)