forked from VimPlug/jedi
Fix decorator issues with nested decorators and class combinations. Fixes #642.
This commit is contained in:
@@ -78,6 +78,9 @@ exe[4]['d']
|
||||
# -----------------
|
||||
# Decorator is a class
|
||||
# -----------------
|
||||
def same_func(func):
|
||||
return func
|
||||
|
||||
class Decorator(object):
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
@@ -94,10 +97,15 @@ nothing("")[0]
|
||||
#? str()
|
||||
nothing("")[1]
|
||||
|
||||
|
||||
@same_func
|
||||
@Decorator
|
||||
def nothing(a,b,c):
|
||||
return a,b,c
|
||||
|
||||
#? int()
|
||||
nothing("")[0]
|
||||
|
||||
class MethodDecoratorAsClass():
|
||||
class_var = 3
|
||||
@Decorator
|
||||
|
||||
Reference in New Issue
Block a user