summaryrefslogtreecommitdiff
path: root/python/testData
diff options
context:
space:
mode:
Diffstat (limited to 'python/testData')
-rw-r--r--python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py6
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/binaryExpression.py4
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/callExpression.py6
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/exceptBlock.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/importElement.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/importStatement.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/listCompExpression.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py4
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/raiseStatement.py4
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/reprExpression.py2
-rw-r--r--python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py10
-rw-r--r--python/testData/inspections/ReplaceNotEqOperator.py2
-rw-r--r--python/testData/mover/innerIf.py2
-rw-r--r--python/testData/mover/innerIf_afterUp.py2
-rw-r--r--python/testData/mover/insideDocComment.py7
-rw-r--r--python/testData/mover/insideDocComment_afterDown.py7
-rw-r--r--python/testData/mover/insideDocComment_afterUp.py7
-rw-r--r--python/testData/mover/multiCompound.py2
-rw-r--r--python/testData/mover/multiCompound_afterUp.py2
-rw-r--r--python/testData/mover/multiLineSelection10.py2
-rw-r--r--python/testData/mover/multiLineSelection10_afterUp.py2
-rw-r--r--python/testData/mover/nestedBlock.py2
-rw-r--r--python/testData/mover/oneLineCompoundOutside.py2
-rw-r--r--python/testData/mover/oneLineCompoundOutside_afterUp.py2
-rw-r--r--python/testData/mover/upInNested.py2
-rw-r--r--python/testData/mover/upInNested_afterUp.py2
27 files changed, 59 insertions, 32 deletions
diff --git a/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py b/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py
new file mode 100644
index 000000000000..b593c519011d
--- /dev/null
+++ b/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py
@@ -0,0 +1,6 @@
+
+class C(object):
+
+ @staticmethod
+ def static_method(obj, name):
+ obj.name = name # warning here \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py b/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
index 42338d8e8fb5..d9c7e856eb88 100644
--- a/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
@@ -1,4 +1,4 @@
-print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> b</warning>)
+print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>)
-if <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> 2</warning>:
+if <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> 2</warning>:
var = a \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/callExpression.py b/python/testData/inspections/PyCompatibilityInspection/callExpression.py
index 7327d8eb28de..68afd5aa009c 100644
--- a/python/testData/inspections/PyCompatibilityInspection/callExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/callExpression.py
@@ -2,11 +2,11 @@ class A(B):
def __init__(self):
<warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not support this syntax. super() should have arguments in Python 2">super()</warning>
-<warning descr="Python version 3.1, 3.2, 3.3 do not have method cmp">cmp()</warning>
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method reduce">reduce()</warning>
+<warning descr="Python version 3.1, 3.2, 3.3, 3.4 do not have method cmp">cmp()</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method reduce">reduce()</warning>
<warning descr="Python version 2.4 does not have method all">all()</warning>
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method buffer">buffer()</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method buffer">buffer()</warning>
def foo(a,b,c):
print (a,b,c)
diff --git a/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py b/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
index 0dde8c786fd1..8f113c72d618 100644
--- a/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
+++ b/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
@@ -5,5 +5,5 @@ try:
try:
do_smth()
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">except ImportError, ImportWarning:
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">except ImportError, ImportWarning:
do()</warning> \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py b/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
index b3be372afddb..15a869f2608b 100644
--- a/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
@@ -1,7 +1,7 @@
<warning descr="Python version 2.4 doesn't support this syntax.">from . import smth</warning>
<warning descr="Python version 2.4 doesn't support this syntax.">from .module import name1, name2</warning>
-from <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning> import BastionClass
+from <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning> import BastionClass
<warning descr="Python version 2.4 doesn't support this syntax.">from . import exceptions</warning>
diff --git a/python/testData/inspections/PyCompatibilityInspection/importElement.py b/python/testData/inspections/PyCompatibilityInspection/importElement.py
index ccf562b71da0..5927f387bf90 100644
--- a/python/testData/inspections/PyCompatibilityInspection/importElement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/importElement.py
@@ -1 +1 @@
-import <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning> \ No newline at end of file
+import <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning> \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/importStatement.py b/python/testData/inspections/PyCompatibilityInspection/importStatement.py
index c72f918962bc..7e08386f4719 100644
--- a/python/testData/inspections/PyCompatibilityInspection/importStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/importStatement.py
@@ -1,3 +1,3 @@
<error descr="Python version 2.7 does not have module builtins"><warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not have module builtins">import builtins</warning></error>
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module __builtin__">import __builtin__</warning> \ No newline at end of file
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module __builtin__">import __builtin__</warning> \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py b/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
index 34e65db98e51..3891ea018954 100644
--- a/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
@@ -1 +1 @@
-var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax in list comprehensions.">1, 2, 3</warning>] \ No newline at end of file
+var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax in list comprehensions.">1, 2, 3</warning>] \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py b/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
index dacb742bba1c..216ed0a98711 100644
--- a/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
@@ -1,2 +1,2 @@
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a trailing 'l' or 'L'.">12l</warning>
-v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error> \ No newline at end of file
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a trailing 'l' or 'L'.">12l</warning>
+v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error> \ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py b/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
index 3696e4a70735..e6f1569259dd 100644
--- a/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
@@ -1,6 +1,6 @@
try:
a
except :
- <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">raise ImportError, ImportWarning</warning>
+ <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">raise ImportError, ImportWarning</warning>
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
diff --git a/python/testData/inspections/PyCompatibilityInspection/reprExpression.py b/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
index a4c606d01fc3..1b3146475795 100644
--- a/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
@@ -1 +1 @@
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
diff --git a/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py b/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
index 1f7dd8799901..9a882a3575ae 100644
--- a/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
@@ -23,7 +23,7 @@ a = <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warn
a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
a = r""
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
a = <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
a = <warning descr="Python version 2.4, 2.5, 3.0 do not support a 'BR' prefix">br</warning>""
@@ -31,12 +31,12 @@ a = <warning descr="Python version 2.4, 2.5, 3.0 do not support a 'BR' prefix">b
a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
a = r""
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
# combined
b = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>"" <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
# never was available
-a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'RR' prefix">rr</warning></error>""
-a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'BB' prefix">bb</warning></error>""
-a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'UU' prefix">uu</warning></error>"" \ No newline at end of file
+a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'RR' prefix">rr</warning></error>""
+a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'BB' prefix">bb</warning></error>""
+a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UU' prefix">uu</warning></error>"" \ No newline at end of file
diff --git a/python/testData/inspections/ReplaceNotEqOperator.py b/python/testData/inspections/ReplaceNotEqOperator.py
index 37a717d2eb9e..c0c6300b8e1f 100644
--- a/python/testData/inspections/ReplaceNotEqOperator.py
+++ b/python/testData/inspections/ReplaceNotEqOperator.py
@@ -1 +1 @@
-print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> <caret>b</warning>) \ No newline at end of file
+print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>) \ No newline at end of file
diff --git a/python/testData/mover/innerIf.py b/python/testData/mover/innerIf.py
index 2faa0c9eaaea..b55e273a290e 100644
--- a/python/testData/mover/innerIf.py
+++ b/python/testData/mover/innerIf.py
@@ -1,3 +1,3 @@
if value is not None:
if not False or value <= 2:
- print "h<caret>ere" \ No newline at end of file
+ print "h<caret>ere"
diff --git a/python/testData/mover/innerIf_afterUp.py b/python/testData/mover/innerIf_afterUp.py
index 6be6e6c8aba8..3bbbd1a64947 100644
--- a/python/testData/mover/innerIf_afterUp.py
+++ b/python/testData/mover/innerIf_afterUp.py
@@ -1,4 +1,4 @@
if value is not None:
print "here"
if not False or value <= 2:
- pass \ No newline at end of file
+ pass
diff --git a/python/testData/mover/insideDocComment.py b/python/testData/mover/insideDocComment.py
new file mode 100644
index 000000000000..1f2b305b93b1
--- /dev/null
+++ b/python/testData/mover/insideDocComment.py
@@ -0,0 +1,7 @@
+def fcn(self, foo, bar):
+ """
+ :type <caret>foo: int
+ :type bar: str
+ """
+ self.foo = foo
+ self.bar = bar \ No newline at end of file
diff --git a/python/testData/mover/insideDocComment_afterDown.py b/python/testData/mover/insideDocComment_afterDown.py
new file mode 100644
index 000000000000..83dbf6192f0d
--- /dev/null
+++ b/python/testData/mover/insideDocComment_afterDown.py
@@ -0,0 +1,7 @@
+def fcn(self, foo, bar):
+ """
+ :type bar: str
+ :type foo: int
+ """
+ self.foo = foo
+ self.bar = bar \ No newline at end of file
diff --git a/python/testData/mover/insideDocComment_afterUp.py b/python/testData/mover/insideDocComment_afterUp.py
new file mode 100644
index 000000000000..fe14fa7b461e
--- /dev/null
+++ b/python/testData/mover/insideDocComment_afterUp.py
@@ -0,0 +1,7 @@
+"""
+ :type foo: int
+ :type bar: str
+ """
+def fcn(self, foo, bar):
+ self.foo = foo
+ self.bar = bar \ No newline at end of file
diff --git a/python/testData/mover/multiCompound.py b/python/testData/mover/multiCompound.py
index e5c86a8112c1..fc9c32e08ed3 100644
--- a/python/testData/mover/multiCompound.py
+++ b/python/testData/mover/multiCompound.py
@@ -1,3 +1,3 @@
for item in range(1,
3):
- b = 2<caret> \ No newline at end of file
+ b = 2<caret>
diff --git a/python/testData/mover/multiCompound_afterUp.py b/python/testData/mover/multiCompound_afterUp.py
index c4fd7def4ab4..be4e18f14745 100644
--- a/python/testData/mover/multiCompound_afterUp.py
+++ b/python/testData/mover/multiCompound_afterUp.py
@@ -1,4 +1,4 @@
b = 2<caret>
for item in range(1,
3):
- pass \ No newline at end of file
+ pass
diff --git a/python/testData/mover/multiLineSelection10.py b/python/testData/mover/multiLineSelection10.py
index 1feb611509ef..b0f261a52221 100644
--- a/python/testData/mover/multiLineSelection10.py
+++ b/python/testData/mover/multiLineSelection10.py
@@ -1,3 +1,3 @@
if True:
<caret><selection> a = 2
- b = 3</selection> \ No newline at end of file
+ b = 3</selection>
diff --git a/python/testData/mover/multiLineSelection10_afterUp.py b/python/testData/mover/multiLineSelection10_afterUp.py
index c8820eb48b4a..8d273a3fce5c 100644
--- a/python/testData/mover/multiLineSelection10_afterUp.py
+++ b/python/testData/mover/multiLineSelection10_afterUp.py
@@ -1,4 +1,4 @@
<caret><selection>a = 2
b = 3</selection>
if True:
- pass \ No newline at end of file
+ pass
diff --git a/python/testData/mover/nestedBlock.py b/python/testData/mover/nestedBlock.py
index af6006847e81..77ca3c158fc4 100644
--- a/python/testData/mover/nestedBlock.py
+++ b/python/testData/mover/nestedBlock.py
@@ -4,4 +4,4 @@ def test(a, b=1):
else:
for n in range(10):
- <caret> print(b) \ No newline at end of file
+ <caret> print(b)
diff --git a/python/testData/mover/oneLineCompoundOutside.py b/python/testData/mover/oneLineCompoundOutside.py
index 3f17b74d0fbb..56e31b8e9a2c 100644
--- a/python/testData/mover/oneLineCompoundOutside.py
+++ b/python/testData/mover/oneLineCompoundOutside.py
@@ -3,4 +3,4 @@ if condition:
elif other_condition:
if another_one:
if T<caret>rue: a = 1 # <- move statement up here
- else: b = 2 \ No newline at end of file
+ else: b = 2
diff --git a/python/testData/mover/oneLineCompoundOutside_afterUp.py b/python/testData/mover/oneLineCompoundOutside_afterUp.py
index 21f27987a762..1f871fbc26a9 100644
--- a/python/testData/mover/oneLineCompoundOutside_afterUp.py
+++ b/python/testData/mover/oneLineCompoundOutside_afterUp.py
@@ -4,4 +4,4 @@ elif other_condition:
if T<caret>rue: a = 1 # <- move statement up here
else: b = 2
if another_one:
- pass \ No newline at end of file
+ pass
diff --git a/python/testData/mover/upInNested.py b/python/testData/mover/upInNested.py
index 4e170cc17d02..89cacaf5127e 100644
--- a/python/testData/mover/upInNested.py
+++ b/python/testData/mover/upInNested.py
@@ -4,4 +4,4 @@ try:
except:
print(zoo(0).foo(2))
except:
- zoo<caret>(3) \ No newline at end of file
+ zoo<caret>(3)
diff --git a/python/testData/mover/upInNested_afterUp.py b/python/testData/mover/upInNested_afterUp.py
index 9b20d8ec3308..cb5ecd8934c0 100644
--- a/python/testData/mover/upInNested_afterUp.py
+++ b/python/testData/mover/upInNested_afterUp.py
@@ -5,4 +5,4 @@ try:
print(zoo(0).foo(2))
zoo(3)
except:
- pass \ No newline at end of file
+ pass