Return a more correct py__class__ for typing base objects

This commit is contained in:
Dave Halter
2020-05-09 16:28:05 +02:00
parent 3b48c76e4a
commit f362932ec5

View File

@@ -330,10 +330,9 @@ class _PseudoTreeNameClass(Value):
yield EmptyFilter()
def py__class__(self):
# TODO this is obviously not correct, but at least gives us a class if
# we have none. Some of these objects don't really have a base class in
# typeshed.
return builtin_from_name(self.inference_state, u'object')
# This might not be 100% correct, but it is good enough. The details of
# the typing library are not really an issue for Jedi.
return builtin_from_name(self.inference_state, u'type')
@property
def name(self):