diff options
Diffstat (limited to 'python/testData/inspections')
13 files changed, 27 insertions, 21 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 |