CheckRegistry().register()
should allow *tags
when called as function
#2232
Labels
bug
Something isn't working
Bug report
The type hints for
CheckRegistry.register
do not allow passingtags
when calling as a function:django-stubs/django-stubs/core/checks/registry.pyi
Lines 40 to 47 in edfebe4
What's wrong
According to the System check framework docs, these (annotated) variants should be equivalent:
However, the second version does not pass
mypy
:How is that should be
The second version should be accepted. This way,
register()
can be called inAppConfig.ready()
, such as in https://github.com/mozilla/django-csp/blob/main/csp/apps.py.System information
python
version: 3.12.3django
version: 5.0.6mypy
version: 1.8.0 (compiled: yes)django-stubs
version: 5.0.2django-stubs-ext
version: 5.0.2The text was updated successfully, but these errors were encountered: