1
0
forked from VimPlug/jedi

Use py__get__ for Django Model.objects

This includes the fix in https://github.com/typeddjango/django-stubs/pull/394
This commit is contained in:
Dave Halter
2020-06-09 23:26:39 +02:00
parent 6d0d75c7d9
commit a2108de2c0
6 changed files with 93 additions and 52 deletions

View File

@@ -288,6 +288,11 @@ class _BaseTreeInstance(AbstractInstanceValue):
"""
# Arguments in __get__ descriptors are obj, class.
# `method` is the new parent of the array, don't know if that's good.
for cls in self.class_value.py__mro__():
result = cls.py__get__on_class(self, instance, class_value)
if result is not NotImplemented:
return result
names = self.get_function_slot_names(u'__get__')
if names:
if instance is None: