Skip to content

Commit

Permalink
Add regression test for pylint-dev#5832
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jun 30, 2022
1 parent 1e2094d commit cee18e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doc/whatsnew/2/2.15/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ False positives fixed

Closes #4951

* Prevent false positives when accessing ``PurePath.parents`` by index (not slice) on Python 3.10+.

Closes #5832


False negatives fixed
=====================

Expand Down
6 changes: 5 additions & 1 deletion tests/functional/n/no/no_member.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -29,3 +29,7 @@ def peer_joined(self, peer):
sorted(parse.parse_qsl(parsed_url.query), key=lambda param: param[0]))
new_parsed_url = parse.ParseResult._replace(parsed_url, query=sorted_query)
new_url = new_parsed_url.geturl() # No error here


# Regression test for https://github.com/PyCQA/pylint/issues/5832
starter_path = Path(__file__).parents[3].resolve()

0 comments on commit cee18e5

Please sign in to comment.