mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-11 06:22:21 +08:00
add magic methods also to non-object inheritances, also important for jedi-vim issue 32
This commit is contained in:
@@ -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=[])
|
||||
|
||||
Reference in New Issue
Block a user