mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
do not emit error, if attribute does not exist
This commit is contained in:
@@ -176,3 +176,5 @@ def process_model_class(ctx: ClassDefContext) -> None:
|
||||
set_fieldname_attrs_for_related_fields(ctx)
|
||||
add_int_id_attribute_if_primary_key_true_is_not_present(ctx)
|
||||
set_objects_queryset_to_model_class(ctx)
|
||||
|
||||
ctx.cls.info.fallback_to_any = True
|
||||
|
||||
@@ -59,6 +59,7 @@ def add_settings_to_django_conf_object(ctx: ClassDefContext,
|
||||
context.set_line(sym.node)
|
||||
api.msg.report(f"Need type annotation for '{sym.node.name()}'", context,
|
||||
severity='error', file=module_file.path)
|
||||
ctx.cls.info.fallback_to_any = True
|
||||
|
||||
|
||||
class DjangoConfSettingsInitializerHook(object):
|
||||
|
||||
Reference in New Issue
Block a user