diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-02 09:33:30 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-05-02 12:42:59 +0200 |
commit | 1664303adf06ace39225c079e559a26861f954f6 (patch) | |
tree | 8887a480c7b52427bde4f6543952f9bde5a5475b /tests/functional/r | |
parent | ce8822807891ba7c43ce09ba3b955007abef73a4 (diff) | |
download | pylint-git-1664303adf06ace39225c079e559a26861f954f6.tar.gz |
`no-value-for-parameter` variadic detection has improved for assign statements
Close #3563
Diffstat (limited to 'tests/functional/r')
-rw-r--r-- | tests/functional/r/regression_no_value_for_parameter.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/functional/r/regression_no_value_for_parameter.py b/tests/functional/r/regression_no_value_for_parameter.py index 30308e605..6dd2ea491 100644 --- a/tests/functional/r/regression_no_value_for_parameter.py +++ b/tests/functional/r/regression_no_value_for_parameter.py @@ -1,6 +1,9 @@ # pylint: disable=missing-docstring,import-error +import os + from Unknown import Unknown + class ConfigManager(Unknown): @@ -13,3 +16,27 @@ class ConfigManager(Unknown): def items(self, sectname, raw=True): pass + + +def func(*, key=None): + return key + + +def varargs_good(*parts): + """All good""" + return os.path.join(*parts) + + +def varargs_no_expr(*parts): + """False positive below this line""" + ret = os.path.join(*parts) + return ret + + +def kwargs_good(**kwargs): + return func(**kwargs) + + +def kwargs_no_expr(**kwargs): + ret = func(**kwargs) + return ret |