Skip to content

Commit

Permalink
Update astroid to 2.5.3 (#4334)
Browse files Browse the repository at this point in the history
* Add test case for typing.Generic with ABCMeta
  • Loading branch information
cdce8p authored Apr 10, 2021
1 parent ac02be7 commit 078ebea
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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?
===========================
Expand Down
2 changes: 2 additions & 0 deletions doc/whatsnew/2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion requirements_test_min.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/n/name/name_styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/t/typing_generic.py
Original file line number Diff line number Diff line change
@@ -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"""
2 changes: 2 additions & 0 deletions tests/functional/t/typing_generic.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[testoptions]
min_pyver=3.7

0 comments on commit 078ebea

Please sign in to comment.