From f362932ec5b4b3aaad29d7502132c22448e04188 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 9 May 2020 16:28:05 +0200 Subject: [PATCH] Return a more correct py__class__ for typing base objects --- jedi/inference/gradual/base.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jedi/inference/gradual/base.py b/jedi/inference/gradual/base.py index 59c6c9f3..8ed1f4bc 100644 --- a/jedi/inference/gradual/base.py +++ b/jedi/inference/gradual/base.py @@ -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):