diff --git a/pyproject.toml b/pyproject.toml index c5b8c7eec2..49c08d428c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,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>=4.0.1,<=4.1.dev0", + "astroid>=4.0.2,<=4.1.dev0", "colorama>=0.4.5; sys_platform=='win32'", "dill>=0.2; python_version<'3.11'", "dill>=0.3.6; python_version>='3.11'", diff --git a/requirements_test_min.txt b/requirements_test_min.txt index 5966b31576..29e05b3c94 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==4.0.1 # Pinned to a specific version for tests +astroid==4.0.2 # Pinned to a specific version for tests typing-extensions~=4.15 py~=1.11.0 pytest~=8.4 diff --git a/tests/functional/u/unused/unused_name_in_string_literal_type_annotation_py38.py b/tests/functional/u/unused/unused_name_in_string_literal_type_annotation_py38.py index d8eb811697..14aaf61532 100644 --- a/tests/functional/u/unused/unused_name_in_string_literal_type_annotation_py38.py +++ b/tests/functional/u/unused/unused_name_in_string_literal_type_annotation_py38.py @@ -3,7 +3,7 @@ from argparse import ArgumentParser # [unused-import] from argparse import Namespace # [unused-import] import http # [unused-import] -from http import HTTPStatus +from http import HTTPStatus, HTTPMethod import typing as t from typing import Literal as Lit @@ -25,3 +25,6 @@ def unused_variable_example(): # See https://peps.python.org/pep-0586/#literals-enums-and-forward-references example4: t.Literal["http.HTTPStatus.OK", "http.HTTPStatus.NOT_FOUND"] example5: "t.Literal[HTTPStatus.OK, HTTPStatus.NOT_FOUND]" + +# Regression test for https://github.com/pylint-dev/pylint/issues/10624 +print(HTTPMethod.CONNECT)