mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-04 05:23:45 +08:00
Fix decorator issues with nested decorators and class combinations. Fixes #642.
This commit is contained in:
1 parent
4b0e164d91
commit
20529d3405
2 files changed
+11
-1
No files matched your search
@@ -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