forked from VimPlug/jedi
illegal decorators tests
This commit is contained in:
@@ -142,6 +142,29 @@ JustAClass.a.__closure__
|
||||
#? int()
|
||||
JustAClass.a()
|
||||
|
||||
# -----------------
|
||||
# illegal decorators
|
||||
# -----------------
|
||||
|
||||
class DecoratorWithoutCall():
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
def __call__(self):
|
||||
return self.func()
|
||||
|
||||
@DecoratorWithoutCall
|
||||
def f():
|
||||
return 1
|
||||
|
||||
@DecoratorWithoutCall(None)
|
||||
def g():
|
||||
return 1
|
||||
|
||||
#?
|
||||
f()
|
||||
#? int()
|
||||
g()
|
||||
|
||||
# -----------------
|
||||
# method decorators
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user