From e082a2c79c5c8b998a7a2ddfb2123df849ac3902 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Wed, 23 Jan 2019 09:13:52 +0100 Subject: Add test case for #2588 --- pylint/test/functional/too_many_arguments.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pylint/test/functional/too_many_arguments.py b/pylint/test/functional/too_many_arguments.py index 71015ab04..689745e27 100644 --- a/pylint/test/functional/too_many_arguments.py +++ b/pylint/test/functional/too_many_arguments.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-docstring +# pylint: disable=missing-docstring,wrong-import-position def stupid_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9): # [too-many-arguments] return arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 @@ -15,3 +15,18 @@ class MyClass: MyClass().mymethod2()() + + +# Check a false positive does not occur +from functools import partial + + +def root_function(first, second, third): + return first + second + third + + +def func_call(): + """Test we don't emit a FP for https://github.com/PyCQA/pylint/issues/2588""" + partial_func = partial(root_function, 1, 2, 3) + partial_func() + return root_function(1, 2, 3) -- cgit v1.2.1