mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +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')
|
debug.warning('Received non class, as a super class')
|
||||||
continue # Just ignore other stuff (user input error).
|
continue # Just ignore other stuff (user input error).
|
||||||
supers.append(cls)
|
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
|
return supers
|
||||||
|
|
||||||
@memoize_default(default=[])
|
@memoize_default(default=[])
|
||||||
|
|||||||
Reference in New Issue
Block a user