mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-11-03 19:17:31 +08:00
Notify when Manager.from_queryset happens inside model class body (#824)
* Refactor to more easily support additional config options * Notify when Manager.from_queryset happens inside model class body - A warning will be emitted whenever `Manager.from_queryset` happens inside of a model class body * Resolve generated default manager types before final iteration A default manager on a model should always exist, eventually. Although, we extend to look through dynamically generated managers on each iteration instead of deferring until the final iteration.
This commit is contained in:
1 parent
140bb38a79
commit
edec5a1c99
8 files changed
+260
-156
No files matched your search
@@ -0,0 +1,3 @@
|
||||
from mypy.errorcodes import ErrorCode
|
||||
|
||||
MANAGER_UNTYPED = ErrorCode("django-manager", "Untyped manager disallowed", "Django")
|
||||
Reference in new issue
Block a user