diff options
author | yushao2 <36848472+yushao2@users.noreply.github.com> | 2023-01-30 16:58:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 09:58:13 +0100 |
commit | 9c6a58f277a7c50e1c3c1821f021b0baab9cda24 (patch) | |
tree | 271957354b82dea07ed169918a99c58d23f6fcb9 /tests | |
parent | 3aed23924e21d2b5a8f1987232def157acd9b446 (diff) | |
download | pylint-git-9c6a58f277a7c50e1c3c1821f021b0baab9cda24.tar.gz |
Fix false positive for `use-maxsplit-arg` with custom split (#8114)
Closes #4857
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/u/use/use_maxsplit_arg.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/u/use/use_maxsplit_arg.py b/tests/functional/u/use/use_maxsplit_arg.py index 92e4eec9f..449457a0c 100644 --- a/tests/functional/u/use/use_maxsplit_arg.py +++ b/tests/functional/u/use/use_maxsplit_arg.py @@ -94,3 +94,11 @@ for j in range(5): # Test for crash when sep is given by keyword
# https://github.com/PyCQA/pylint/issues/5737
get_last = SEQ.split(sep=None)[-1] # [use-maxsplit-arg]
+
+
+class FalsePositive4857:
+ def split(self, point):
+ return point
+
+obj = FalsePositive4857()
+obj = obj.split((0, 0))[0]
|