diff --git a/ChangeLog b/ChangeLog index 808d31f5d4..4a64d928d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,10 @@ Release date: Undefined Closes #4301 +* Updated ``astroid`` to 2.5.3 + + Closes #2822, #4206, #4284 + What's New in Pylint 2.7.5? =========================== diff --git a/doc/whatsnew/2.8.rst b/doc/whatsnew/2.8.rst index 6f502fa942..12c4661cbb 100644 --- a/doc/whatsnew/2.8.rst +++ b/doc/whatsnew/2.8.rst @@ -26,3 +26,5 @@ Other Changes * The 'doc' extra-require has been removed. ``pylint.version`` is now ``pylint.__version__`` and ``__pkginfo__`` does not contain the package metadata anymore. + +* Updated ``astroid`` to 2.5.3 diff --git a/requirements_test_min.txt b/requirements_test_min.txt index f45556b886..389078c1e0 100644 --- a/requirements_test_min.txt +++ b/requirements_test_min.txt @@ -1,4 +1,4 @@ -e . -astroid==2.5.2 # Pinned to a specific version for tests +astroid==2.5.3 # Pinned to a specific version for tests pytest~=6.2 pytest-benchmark~=3.2 diff --git a/setup.cfg b/setup.cfg index 186dbdb57f..8bc8357312 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ project_urls = [options] packages = find: install_requires = - astroid>=2.5.2,<2.7 + astroid>=2.5.3,<2.7 isort>=4.2.5,<6 mccabe>=0.6,<0.7 toml>=0.7.1 diff --git a/tests/functional/n/name/name_styles.py b/tests/functional/n/name/name_styles.py index 99d8066421..455ba759a2 100644 --- a/tests/functional/n/name/name_styles.py +++ b/tests/functional/n/name/name_styles.py @@ -151,7 +151,7 @@ class FooEnum(Enum): bad_enum_name = 2 # [invalid-name] class Bar: - """Class with class constants annotated with ClassVar.""" + """Class with class variables annotated with ClassVar.""" CLASS_CONST: ClassVar[int] = 42 CLASS_CONST2: ClassVar = "const" variable: ClassVar[str] = "invalid name" diff --git a/tests/functional/t/typing_generic.py b/tests/functional/t/typing_generic.py new file mode 100644 index 0000000000..0e121a1f6f --- /dev/null +++ b/tests/functional/t/typing_generic.py @@ -0,0 +1,14 @@ +# pylint: disable=missing-docstring,invalid-name,too-few-public-methods + +# https://github.com/PyCQA/pylint/issues/2822 +# Base should be subscriptable, even with ABCMeta as metaclass +from abc import ABCMeta +from typing import Generic, TypeVar + +T = TypeVar("T") + +class Base(Generic[T], metaclass=ABCMeta): + """Base""" + +class Impl(Base[str]): + """Impl""" diff --git a/tests/functional/t/typing_generic.rc b/tests/functional/t/typing_generic.rc new file mode 100644 index 0000000000..a17bb22daf --- /dev/null +++ b/tests/functional/t/typing_generic.rc @@ -0,0 +1,2 @@ +[testoptions] +min_pyver=3.7