mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-20 00:28:29 +08:00
add nested Meta inheritance support for forms
This commit is contained in:
9
mypy_django_plugin/transformers/forms.py
Normal file
9
mypy_django_plugin/transformers/forms.py
Normal file
@@ -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