diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-04-10 17:01:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 17:01:15 +0200 |
commit | 078ebeab91722ed55a9ee49d0c2fbd9fd425421c (patch) | |
tree | 910ccfd00d2c89230afd02f1eeaef363780d9b26 | |
parent | ac02be7686bd928729f843e08421fb63e1c38d4b (diff) | |
download | pylint-git-078ebeab91722ed55a9ee49d0c2fbd9fd425421c.tar.gz |
Update ``astroid`` to 2.5.3 (#4334)
* Add test case for typing.Generic with ABCMeta
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/whatsnew/2.8.rst | 2 | ||||
-rw-r--r-- | requirements_test_min.txt | 2 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tests/functional/n/name/name_styles.py | 2 | ||||
-rw-r--r-- | tests/functional/t/typing_generic.py | 14 | ||||
-rw-r--r-- | tests/functional/t/typing_generic.rc | 2 |
7 files changed, 25 insertions, 3 deletions
@@ -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 6f502fa94..12c4661cb 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 f45556b88..389078c1e 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 @@ -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 99d806642..455ba759a 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 000000000..0e121a1f6 --- /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 000000000..a17bb22da --- /dev/null +++ b/tests/functional/t/typing_generic.rc @@ -0,0 +1,2 @@ +[testoptions] +min_pyver=3.7 |