Skip to content

Commit

Permalink
Use misc as the error codes for manager errors.
Browse files Browse the repository at this point in the history
Since mypy does not support suppressing errors with custom error codes
yet, this is a temporary workaround to allow people to type ignore the
error with the `misc` error code.

TODO:
Use the custom error code when python/mypy#12987 is fixed.

Signed-off-by: Zixuan James Li <[email protected]>
  • Loading branch information
PIG208 committed Aug 8, 2022
1 parent ae9f700 commit 95c5f57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy_django_plugin/errorcodes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mypy.errorcodes import ErrorCode

MANAGER_UNTYPED = ErrorCode("django-manager", "Untyped manager disallowed", "Django")
MANAGER_MISSING = ErrorCode("django-manager-missing", "Couldn't resolve manager for model", "Django")
MANAGER_UNTYPED = ErrorCode("misc", "Untyped manager disallowed", "Django")
MANAGER_MISSING = ErrorCode("misc", "Couldn't resolve manager for model", "Django")

0 comments on commit 95c5f57

Please sign in to comment.