summaryrefslogtreecommitdiff
path: root/tests/functional/r/regression/regression_posonly_args.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/r/regression/regression_posonly_args.py')
-rw-r--r--tests/functional/r/regression/regression_posonly_args.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/functional/r/regression/regression_posonly_args.py b/tests/functional/r/regression/regression_posonly_args.py
new file mode 100644
index 000000000..750b1f951
--- /dev/null
+++ b/tests/functional/r/regression/regression_posonly_args.py
@@ -0,0 +1,21 @@
+"""Test linting.
+
+This is only intended to test pylint support for python 3.8's
+positional-only arguments (PEP 570).
+"""
+
+
+class Foobar:
+ """Class for frobulating the Foobar."""
+
+ @classmethod
+ def buildme(cls, /, value):
+ """Construct object using alternate method."""
+ return cls(value).abc
+
+ def runme(self, qrs, /, xyz=None):
+ """Do something funcy."""
+ if self.abc and qrs and xyz:
+ print("found something else")
+
+ abc = 42