mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-13 16:39:02 +08:00
make ValuesQuerySet have proper Collection generic type (#140)
This commit is contained in:
1 parent
5fc39ff110
commit
fc9a335dfd
11 files changed
+93
-88
No files matched your search
@@ -43,7 +43,9 @@ def return_proper_field_type_from_get_field(ctx: MethodContext, django_context:
|
||||
try:
|
||||
field = model_cls._meta.get_field(field_name)
|
||||
except FieldDoesNotExist as exc:
|
||||
ctx.api.fail(exc.args[0], ctx.context)
|
||||
# if model is abstract, do not raise exception, skip false positives
|
||||
if not model_cls._meta.abstract:
|
||||
ctx.api.fail(exc.args[0], ctx.context)
|
||||
return AnyType(TypeOfAny.from_error)
|
||||
|
||||
field_fullname = helpers.get_class_fullname(field.__class__)
|
||||
|
||||
Reference in new issue
Block a user