Allow overridable checks to be CheckMessage (#497)

* Allow overridable checks to be CheckMessage

The checks framework expects return types to be "List[CheckMessage]". This
allows all overridable checks-returning methods to return the more general
"CheckMessage", instead of the "Error" subclass.

* Ignore an incorrect usage of the checks API in Django 2.2
This commit is contained in:
Brian Helba
2020-10-22 08:12:36 -04:00
committed by GitHub
parent d746e3f5e4
commit 9d4d06f8b3
6 changed files with 13 additions and 10 deletions

View File

@@ -68,6 +68,9 @@ IGNORED_ERRORS = {
'error: "HttpResponse" has no attribute "streaming_content"',
'error: "HttpResponse" has no attribute "context_data"',
],
'admin_checks': [
'Argument 1 to "append" of "list" has incompatible type "str"; expected "CheckMessage"'
],
'admin_inlines': [
'error: "HttpResponse" has no attribute "rendered_content"',
],