mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-11-04 03:22:51 +08:00
add nested Meta inheritance support for forms
This commit is contained in:
1 parent
2d3b5492f0
commit
14ea848dd7
5 files changed
+71
-24
No files matched your search
@@ -0,0 +1,9 @@
|
||||
from mypy.plugin import ClassDefContext
|
||||
from mypy_django_plugin import helpers
|
||||
|
||||
|
||||
def make_meta_nested_class_inherit_from_any(ctx: ClassDefContext) -> None:
|
||||
meta_node = helpers.get_nested_meta_node_for_current_class(ctx.cls.info)
|
||||
if meta_node is None:
|
||||
return None
|
||||
meta_node.fallback_to_any = True
|
||||
Reference in new issue
Block a user