From 03f4dd5516f635d3382190352f000c08f019aa19 Mon Sep 17 00:00:00 2001 From: David Halter Date: Mon, 19 Nov 2012 15:32:18 +0100 Subject: [PATCH] add magic methods also to non-object inheritances, also important for jedi-vim issue 32 --- jedi/evaluate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jedi/evaluate.py b/jedi/evaluate.py index 3afa3aa8..970f2c06 100644 --- a/jedi/evaluate.py +++ b/jedi/evaluate.py @@ -349,6 +349,9 @@ class Class(use_metaclass(CachedMetaClass, parsing.Base)): debug.warning('Received non class, as a super class') continue # Just ignore other stuff (user input error). supers.append(cls) + if not supers and self.base.parent != builtin.Builtin.scope: + # add `object` to classes + supers += get_scopes_for_name(builtin.Builtin.scope, 'object') return supers @memoize_default(default=[])