fixed PY-9405 Method can be static: handle existing decorators

This commit is contained in:
Ekaterina Tuzova
2013-04-09 14:41:50 +04:00
parent 913e96ea0e
commit 6eb69aa83a
10 changed files with 111 additions and 10 deletions

View File

@@ -0,0 +1,10 @@
__author__ = 'ktisha'
def foo(x):
return x
class A():
@accepts(int, int)
def my_<caret>method(self):
print "Smth"

View File

@@ -0,0 +1,11 @@
__author__ = 'ktisha'
def foo(x):
return x
class A():
@staticmethod
@accepts(int, int)
def my_<caret>method():
print "Smth"

View File

@@ -0,0 +1,10 @@
__author__ = 'ktisha'
def foo(x):
return x
class A():
@my_deco
def my_<caret>method(self):
print "Smth"

View File

@@ -0,0 +1,11 @@
__author__ = 'ktisha'
def foo(x):
return x
class A():
@staticmethod
@my_deco
def my_method():
print "Smth"

View File

@@ -0,0 +1,8 @@
__author__ = 'ktisha'
class Child(Base):
def __init__(self):
super(Child, self).__init__()
def <caret>f():
test = 1

View File

@@ -0,0 +1,9 @@
__author__ = 'ktisha'
class Child(Base):
def __init__(self):
super(Child, self).__init__()
@staticmethod
def f():
test = 1