mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-15 20:26:04 +07:00
fixed PY-9405 Method can be static: handle existing decorators
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
def foo(x):
|
||||
return x
|
||||
|
||||
class A():
|
||||
|
||||
@accepts(int, int)
|
||||
def my_<caret>method(self):
|
||||
print "Smth"
|
||||
@@ -0,0 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
def foo(x):
|
||||
return x
|
||||
|
||||
class A():
|
||||
|
||||
@staticmethod
|
||||
@accepts(int, int)
|
||||
def my_<caret>method():
|
||||
print "Smth"
|
||||
@@ -0,0 +1,10 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
def foo(x):
|
||||
return x
|
||||
|
||||
class A():
|
||||
|
||||
@my_deco
|
||||
def my_<caret>method(self):
|
||||
print "Smth"
|
||||
@@ -0,0 +1,11 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
def foo(x):
|
||||
return x
|
||||
|
||||
class A():
|
||||
|
||||
@staticmethod
|
||||
@my_deco
|
||||
def my_method():
|
||||
print "Smth"
|
||||
@@ -0,0 +1,8 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
def <caret>f():
|
||||
test = 1
|
||||
@@ -0,0 +1,9 @@
|
||||
__author__ = 'ktisha'
|
||||
|
||||
class Child(Base):
|
||||
def __init__(self):
|
||||
super(Child, self).__init__()
|
||||
|
||||
@staticmethod
|
||||
def f():
|
||||
test = 1
|
||||
Reference in New Issue
Block a user