diff --git a/doc/whatsnew/fragments/5832.false_positive b/doc/whatsnew/fragments/5832.false_positive new file mode 100644 index 0000000000..40ae0fd1a2 --- /dev/null +++ b/doc/whatsnew/fragments/5832.false_positive @@ -0,0 +1,3 @@ +Prevent false positives when accessing ``PurePath.parents`` by index (not slice) on Python 3.10+. + +Closes #5832 diff --git a/tests/functional/n/no/no_member.py b/tests/functional/n/no/no_member.py index bff04a7b2f..1db70cde54 100644 --- a/tests/functional/n/no/no_member.py +++ b/tests/functional/n/no/no_member.py @@ -1,5 +1,5 @@ # pylint: disable=missing-docstring, unused-argument, wrong-import-position, invalid-name - +from pathlib import Path # Regression test for https://github.com/PyCQA/pylint/issues/400 class TestListener: @@ -42,3 +42,7 @@ class Derived(Base): print(Derived.label) + + +# Regression test for https://github.com/PyCQA/pylint/issues/5832 +starter_path = Path(__file__).parents[3].resolve()