summaryrefslogtreecommitdiff
path: root/tests/functional/a/arguments_positional_only.py
diff options
context:
space:
mode:
authorMark Byrne <31762852+mbyrnepr2@users.noreply.github.com>2023-05-16 10:34:47 +0200
committerGitHub <noreply@github.com>2023-05-16 10:34:47 +0200
commitd392ea5d8a11049a275207cf18e488bf19a57c69 (patch)
treeaf336aaa260297d971ed5fbf16acbb32c9dde8c2 /tests/functional/a/arguments_positional_only.py
parent0a6c21bfab8237431c9f5198068451b243e91448 (diff)
downloadpylint-git-d392ea5d8a11049a275207cf18e488bf19a57c69.tar.gz
Add new checker `kwarg-superseded-by-positional-arg` and fix a false positive (#8644)
* Fix a false positive for ``redundant-keyword-arg`` when a function, with a keyword-only-parameter and ``**kwargs``, is called with a positional argument and a keyword argument where the keyword argument has the same name as the positional-only-parameter. * Add new checker ``kwarg-superseded-by-positional-arg`` which emits a warning message for the above scenario. Closes #8558 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/functional/a/arguments_positional_only.py')
-rw-r--r--tests/functional/a/arguments_positional_only.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/functional/a/arguments_positional_only.py b/tests/functional/a/arguments_positional_only.py
deleted file mode 100644
index eb03f1803..000000000
--- a/tests/functional/a/arguments_positional_only.py
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Test `no-value-for-parameter` in the context of positional-only parameters"""
-
-# pylint: disable=missing-docstring, unused-argument
-
-
-def name1(param1, /, **kwargs): ...
-def name2(param1, /, param2, **kwargs): ...
-def name3(param1=True, /, **kwargs): ...
-def name4(param1, **kwargs): ...
-
-name1(param1=43) # [no-value-for-parameter]
-name1(43)
-name2(1, param2=False)
-name3()
-name4(param1=43)