Skip to content

Commit b192486

Browse files
Add regression test for FP on too-many-function-args and dataclasses
Closes #10788
1 parent 1039bed commit b192486

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix a false positive for ``too-many-function-args`` for dataclasses
2+
using generic type aliases (PEP 695).
3+
4+
Closes #10788

tests/functional/d/dataclass/dataclass_py312.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@ class C(B[int]):
1313

1414

1515
C(x=0)
16+
17+
18+
@dataclasses.dataclass
19+
class One[T]:
20+
one: T
21+
22+
23+
@dataclasses.dataclass
24+
class Two[T](One[T]):
25+
two: T
26+
27+
one = One(1)
28+
two = Two(1, 2)

0 commit comments

Comments
 (0)