From dd0fd9c96bf5b1cf129b9d5838be0565de167bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:44:38 +0100 Subject: [PATCH] Use a branch to test `astoid` fix --- pyproject.toml | 2 +- requirements_test_min.txt | 2 +- tests/functional/n/no/no_member_imports.py | 6 ------ tests/functional/n/no/no_member_imports.rc | 2 +- tests/functional/n/no/no_member_imports.txt | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5a91247410..da80c743b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ dependencies = [ # Also upgrade requirements_test_min.txt. # Pinned to dev of second minor update to allow editable installs and fix primer issues, # see https://github.com/pylint-dev/astroid/issues/1341 - "astroid>=3.3.5,<=4.0.0-dev0", + "astroid @ git+https://github.com/danielnoord/astroid.git@collections-fix", "isort>=4.2.5,<6,!=5.13.0", "mccabe>=0.6,<0.8", "tomli>=1.1.0;python_version<'3.11'", diff --git a/requirements_test_min.txt b/requirements_test_min.txt index 11505dbeee..8c47f8653c 100644 --- a/requirements_test_min.txt +++ b/requirements_test_min.txt @@ -1,6 +1,6 @@ .[testutils,spelling] # astroid dependency is also defined in pyproject.toml -astroid==3.3.5 # Pinned to a specific version for tests +astroid @ git+https://github.com/danielnoord/astroid.git@collections-fix typing-extensions~=4.12 py~=1.11.0 pytest~=8.3 diff --git a/tests/functional/n/no/no_member_imports.py b/tests/functional/n/no/no_member_imports.py index ead6d93352..33f08f4c84 100644 --- a/tests/functional/n/no/no_member_imports.py +++ b/tests/functional/n/no/no_member_imports.py @@ -32,12 +32,6 @@ def test_ignored_modules_root_one_applies_as_well() -> None: argparse.submodule.THIS_does_not_EXIST -def test_ignored_modules_patterns() -> None: - import collections - - collections.abc.THIS_does_not_EXIST - - def test_ignored_classes_no_recursive_pattern() -> None: import sys diff --git a/tests/functional/n/no/no_member_imports.rc b/tests/functional/n/no/no_member_imports.rc index 59db427c27..cee25fa428 100644 --- a/tests/functional/n/no/no_member_imports.rc +++ b/tests/functional/n/no/no_member_imports.rc @@ -1,3 +1,3 @@ [TYPECHECK] -ignored-modules=argparse,xml.etree.,collections.abc* +ignored-modules=argparse,xml.etree. ignored-classes=sys*,optparse.Values,Option diff --git a/tests/functional/n/no/no_member_imports.txt b/tests/functional/n/no/no_member_imports.txt index 477558597c..3de2c75a13 100644 --- a/tests/functional/n/no/no_member_imports.txt +++ b/tests/functional/n/no/no_member_imports.txt @@ -1,3 +1,3 @@ no-member:10:4:10:28:test_no_member_in_getattr:Module 'math' has no 'THIS_does_not_EXIST' member:INFERENCE no-member:25:4:25:33:test_ignored_modules_invalid_pattern:Module 'xml.etree' has no 'THIS_does_not_EXIST' member:INFERENCE -no-member:44:4:44:27:test_ignored_classes_no_recursive_pattern:Module 'sys' has no 'THIS_does_not_EXIST' member:INFERENCE +no-member:38:4:38:27:test_ignored_classes_no_recursive_pattern:Module 'sys' has no 'THIS_does_not_EXIST' member:INFERENCE