Bug description
False positive specifically when using TypeVarTuple / PEP-695 generics
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Generic, TypeVar
T = TypeVar("T")
class Base(Generic[T], ABC):
@abstractmethod
def get_item(self) -> T: ...
class Middle[NpDtype, *Shape]:
"""Implements the abstract method from Base."""
def get_item(self) -> NpDtype:
raise NotImplementedError
class Concrete[NpDtype, *Shape](Middle[NpDtype, *Shape], Base[NpDtype]):
"""All abstract methods are satisfied via Middle."""
obj = Concrete() # E0110 false positive
Configuration
Command used
Pylint output
************* Module pylint_e0110_repro
pylint_e0110_repro.py:47:6: E0110: Abstract class 'Concrete' with abstract methods instantiated
(abstract-class-instantiated)
Expected behavior
No error
Pylint version
$ pylint --version
pylint 4.0.5
astroid 4.0.4
Python 3.12.6 (main, Oct 9 2024, 11:19:43) [GCC 13.2.0]
OS / Environment
No response
Additional dependencies
Bug description
False positive specifically when using TypeVarTuple / PEP-695 generics
Configuration
Command used
Pylint output
Expected behavior
No error
Pylint version
OS / Environment
No response
Additional dependencies