diff options
Diffstat (limited to 'python/testData/intentions/PyConvertMethodToPropertyIntentionTest')
8 files changed, 73 insertions, 0 deletions
diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/emptyReturn.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/emptyReturn.py new file mode 100644 index 000000000000..ef5434161170 --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/emptyReturn.py @@ -0,0 +1,3 @@ +class A(): + def mo<caret>o(self): + return
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/noReturn.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/noReturn.py new file mode 100644 index 000000000000..649a90b03958 --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/noReturn.py @@ -0,0 +1,12 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + def x<caret>(self): + print self._x + + +x = MyClass().x()
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/paramList.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/paramList.py new file mode 100644 index 000000000000..d2426d62d4f6 --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/paramList.py @@ -0,0 +1,13 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + def x<caret>(self, y): + print y + return self._x + + +x = MyClass().x()
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/property.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/property.py new file mode 100644 index 000000000000..188567a6e00c --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/property.py @@ -0,0 +1,13 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + @property + def x<caret>(self): + return self._x + + +x = MyClass().x()
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple.py new file mode 100644 index 000000000000..ec8c4daecb41 --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple.py @@ -0,0 +1,12 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + def x<caret>(self): + return self._x + + +x = MyClass().x()
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple_after.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple_after.py new file mode 100644 index 000000000000..1c8040301451 --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/simple_after.py @@ -0,0 +1,13 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + @property + def x(self): + return self._x + + +x = MyClass().x
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield.py new file mode 100644 index 000000000000..e20e779c8c1c --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield.py @@ -0,0 +1,3 @@ +class A(): + def mo<caret>o(self): + yield
\ No newline at end of file diff --git a/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield_after.py b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield_after.py new file mode 100644 index 000000000000..a2a771b21b1e --- /dev/null +++ b/python/testData/intentions/PyConvertMethodToPropertyIntentionTest/yield_after.py @@ -0,0 +1,4 @@ +class A(): + @property + def mo<caret>o(self): + yield
\ No newline at end of file |