From 05e9418a47eab0c45415c32b82afe0aff2e69a75 Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Tue, 30 May 2017 15:19:41 +0300 Subject: [PATCH] PY-8174 Include the new warning, the quickfix is bound to, in the test data --- .../PyArgumentListInspection/badarglist.py | 12 ++++++------ .../PyArgumentListInspection/decorators.py | 4 ++-- .../PyArgumentListInspection/kwargsMapToNothing.py | 4 ++-- .../inspections/PyArgumentListInspection/py1268.py | 14 +++++++------- .../inspections/PyArgumentListInspection/py3k.py | 2 +- .../PyArgumentListInspection/tupleVsLiteralList.py | 2 +- .../PyRemoveArgumentQuickFixTest/duplicate.py | 2 +- .../PyRemoveArgumentQuickFixTest/unexpected.py | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/python/testData/inspections/PyArgumentListInspection/badarglist.py b/python/testData/inspections/PyArgumentListInspection/badarglist.py index 8ac2755a27aa..08bf20f42b00 100644 --- a/python/testData/inspections/PyArgumentListInspection/badarglist.py +++ b/python/testData/inspections/PyArgumentListInspection/badarglist.py @@ -18,8 +18,8 @@ def f1(): pass f1() -f1(1) -f1(a = 1) +f1(1) +f1(a = 1) def f2(a): @@ -28,19 +28,19 @@ def f2(a): f2() # ok, fail f2(1) # ok, pass -f2(1, 2) # ok, fail +f2(1, 2) # ok, fail f2(a = 1) # ok, pass f2(b = 1) # ok, fail -f2(a = 1, b = 2) # ok, fail +f2(a = 1, b = 2) # ok, fail def f3(a, b): pass f3(1, 2) -f3(1, 2, 3) +f3(1, 2, 3) f3(b=2, a=1) -f3(b=1, b=2, a=1) +f3(b=1, b=2, a=1) f3(1, b=2) f3(a=1, 2) diff --git a/python/testData/inspections/PyArgumentListInspection/decorators.py b/python/testData/inspections/PyArgumentListInspection/decorators.py index 9377b5eb8148..6cb33c5d4842 100644 --- a/python/testData/inspections/PyArgumentListInspection/decorators.py +++ b/python/testData/inspections/PyArgumentListInspection/decorators.py @@ -13,7 +13,7 @@ def f7(): def f8(): pass -@deco(1, 2) # fail: extra param +@deco(1, 2) # fail: extra param def f9(): pass @@ -57,7 +57,7 @@ class Dec2: def __init__(self, p1, p2): pass -@Dec2() # fail: no p1, p2 +@Dec2() # fail: no p1, p2 def f17(): pass diff --git a/python/testData/inspections/PyArgumentListInspection/kwargsMapToNothing.py b/python/testData/inspections/PyArgumentListInspection/kwargsMapToNothing.py index 5029c3b56bd8..c285a60cf423 100644 --- a/python/testData/inspections/PyArgumentListInspection/kwargsMapToNothing.py +++ b/python/testData/inspections/PyArgumentListInspection/kwargsMapToNothing.py @@ -5,5 +5,5 @@ arg = [1, 2, 3] kwarg = {'c':3} f5(*arg, **kwarg) # ok f5(1,2, **kwarg) # ok -f5(1, 2, 3, **kwarg) # fail -f5(1, 2, 3, *arg) # fail +f5(1, 2, 3, **kwarg) # fail +f5(1, 2, 3, *arg) # fail diff --git a/python/testData/inspections/PyArgumentListInspection/py1268.py b/python/testData/inspections/PyArgumentListInspection/py1268.py index baaa9fd9e496..951df27428ee 100644 --- a/python/testData/inspections/PyArgumentListInspection/py1268.py +++ b/python/testData/inspections/PyArgumentListInspection/py1268.py @@ -3,8 +3,8 @@ def f(a, b, c): f(c=1, *(10, 20)) f(*(10, 20), c=1) -f(*(10, 20, 30), c=1) # fail: duplicate c -f(1, *(10, 20, 30)) # fail: tuple too long +f(*(10, 20, 30), c=1) # fail: duplicate c +f(1, *(10, 20, 30)) # fail: tuple too long f(1, *(10)) # fail: wrong type f(1, *(10,)) # fail: tuple too short, c not mapped @@ -24,14 +24,14 @@ f2(*(1,2), a=1, b=2, *(1,2)) # fail: a and b twice -f3(1, 2, *(3,), c=4) # fail: c twice +f3(c=3, a=1, b=2, *(1,2)) # fail: a and b twice +f3(1, 2, *(3,), c=4) # fail: c twice f3(1,2,3, *(1,2)) f3(c=3, *(1,2)) # -f3(1, c=3, *(1,2)) # fail: c twice -f3(c=3, a=1, b=2, d=(1,2)) # fail: unexpected d +f3(1, c=3, *(1,2)) # fail: c twice +f3(c=3, a=1, b=2, d=(1,2)) # fail: unexpected d f3(1, c=3, *(10,)) # ZZZ f3(1, *(10,)) f3(1, *(10,), c=20) f3(*(1,2), c=20) -f3(*(1,2), a=20) # fail: a twice +f3(*(1,2), a=20) # fail: a twice diff --git a/python/testData/inspections/PyArgumentListInspection/py3k.py b/python/testData/inspections/PyArgumentListInspection/py3k.py index 70e7820379f0..4ac87031c611 100644 --- a/python/testData/inspections/PyArgumentListInspection/py3k.py +++ b/python/testData/inspections/PyArgumentListInspection/py3k.py @@ -19,7 +19,7 @@ def a23(a, *b, c=1): pass a23(1,2,3, c=10) # pass -a23(1,2,3, c=10, a=1) # fail +a23(1,2,3, c=10, a=1) # fail a23(c=10, a=1) # pass a23(c=10, 1) # fail a23(*args, c=1) # pass diff --git a/python/testData/inspections/PyArgumentListInspection/tupleVsLiteralList.py b/python/testData/inspections/PyArgumentListInspection/tupleVsLiteralList.py index d3c41a99bd97..3936d0df1780 100644 --- a/python/testData/inspections/PyArgumentListInspection/tupleVsLiteralList.py +++ b/python/testData/inspections/PyArgumentListInspection/tupleVsLiteralList.py @@ -2,4 +2,4 @@ def f20(a, (b, c)): pass f20(1, [2, 3]) # ok -f20(1, (2, 3, 4)) # fail +f20(1, (2, 3, 4)) # fail diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py index 4716f42c8564..47b5067cc548 100644 --- a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py +++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/duplicate.py @@ -2,4 +2,4 @@ def foo(a, p): pass -foo(1, p=2, p=33) +foo(1, p=2, p=33) diff --git a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py index 82f42d31e15a..2ae09ef56bce 100644 --- a/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py +++ b/python/testData/quickFixes/PyRemoveArgumentQuickFixTest/unexpected.py @@ -2,6 +2,6 @@ def foo(a): pass -foo(1, 23) +foo(1, 23)