summaryrefslogtreecommitdiff
path: root/tests/functional/missing_kwoa_py3.py
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2019-06-14 22:28:42 -0700
committerClaudiu Popa <pcmanticore@gmail.com>2019-06-20 10:02:14 +0200
commit33b8185a455c1686d038258697bb93005f2441c2 (patch)
tree4a50ccac775c009436e45803129e428ed694065f /tests/functional/missing_kwoa_py3.py
parent7081d91f30728653000bdfc59ea85a3395f96418 (diff)
downloadpylint-git-33b8185a455c1686d038258697bb93005f2441c2.tar.gz
Stopped installing tests with package
Diffstat (limited to 'tests/functional/missing_kwoa_py3.py')
-rw-r--r--tests/functional/missing_kwoa_py3.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/functional/missing_kwoa_py3.py b/tests/functional/missing_kwoa_py3.py
new file mode 100644
index 000000000..3b6e1c0d8
--- /dev/null
+++ b/tests/functional/missing_kwoa_py3.py
@@ -0,0 +1,36 @@
+# pylint: disable=missing-docstring,unused-argument
+
+def target(pos, *, keyword):
+ return pos + keyword
+
+
+def forwarding_kwds(pos, **kwds):
+ target(pos, **kwds)
+
+
+def forwarding_args(*args, keyword):
+ target(*args, keyword=keyword)
+
+def forwarding_conversion(*args, **kwargs):
+ target(*args, **dict(kwargs))
+
+
+def not_forwarding_kwargs(*args, **kwargs):
+ target(*args) # [missing-kwoa]
+
+
+target(1, keyword=2)
+
+PARAM = 1
+target(2, PARAM) # [too-many-function-args, missing-kwoa]
+
+
+def some_function(*, param):
+ return param + 2
+
+
+def other_function(**kwargs):
+ return some_function(**kwargs) # Does not trigger missing-kwoa
+
+
+other_function(param=2)