mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-12 15:01:55 +08:00
Add fallback related manager in final iteration of AddRelatedManagers (#993)
If a django model has a Manager class that cannot be resolved statically (if it is generated in a way where we cannot import it, like `objects = my_manager_factory()`), we fallback to the default related manager, so you at least get a base level of working type checking.
This commit is contained in:
committed by
GitHub
parent
32e13c37a6
commit
9044a354cb
@@ -1,3 +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 related manager for model", "Django")
|
||||
|
||||
Reference in New Issue
Block a user