Bug description
a @DataClass base defines a field, and two child classes both use
PEP 695 TypeVarTuple syntax (*Shape) with the TypeVarTuple forwarded in
the parent specialization (Middle[T, *Shape]). Pylint loses track of the
inherited field through the forwarded TypeVarTuple chain.
Likely related to #10972
from dataclasses import dataclass
@dataclass(frozen=True, kw_only=True)
class Base:
value: str
@dataclass(frozen=True, kw_only=True)
class Middle[T, *Shape](Base):
pass
@dataclass(frozen=True, kw_only=True)
class Upper[T, *Shape](Middle[T, *Shape]):
pass
obj = Upper[str, int](value="hello")
Command used
Pylint output
E1123: Unexpected keyword argument 'value' in constructor call
Expected behavior
No error raised
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
a @DataClass base defines a field, and two child classes both use
PEP 695 TypeVarTuple syntax (
*Shape) with the TypeVarTuple forwarded inthe parent specialization (
Middle[T, *Shape]). Pylint loses track of theinherited field through the forwarded TypeVarTuple chain.
Likely related to #10972
Command used
Pylint output
Expected behavior
No error raised
Pylint version
OS / Environment
No response
Additional dependencies