summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-04-10 17:01:15 +0200
committerGitHub <noreply@github.com>2021-04-10 17:01:15 +0200
commit078ebeab91722ed55a9ee49d0c2fbd9fd425421c (patch)
tree910ccfd00d2c89230afd02f1eeaef363780d9b26
parentac02be7686bd928729f843e08421fb63e1c38d4b (diff)
downloadpylint-git-078ebeab91722ed55a9ee49d0c2fbd9fd425421c.tar.gz
Update ``astroid`` to 2.5.3 (#4334)
* Add test case for typing.Generic with ABCMeta
-rw-r--r--ChangeLog4
-rw-r--r--doc/whatsnew/2.8.rst2
-rw-r--r--requirements_test_min.txt2
-rw-r--r--setup.cfg2
-rw-r--r--tests/functional/n/name/name_styles.py2
-rw-r--r--tests/functional/t/typing_generic.py14
-rw-r--r--tests/functional/t/typing_generic.rc2
7 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 808d31f5d..4a64d928d 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 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
diff --git a/setup.cfg b/setup.cfg
index 186dbdb57..8bc835731 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 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