Skip to content

Commit 9a23f58

Browse files
Fix typo in test_dataclasses.py (gh-95735)
`dataclass` was called as a function when it was almost certainly intended to be a decorator. (cherry picked from commit 59e09ef) Co-authored-by: da-woods <[email protected]>
1 parent 426bf7b commit 9a23f58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_dataclasses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,12 +2129,12 @@ class C(B):
21292129
self.assertEqual(c.z, 100)
21302130

21312131
def test_no_init(self):
2132-
dataclass(init=False)
2132+
@dataclass(init=False)
21332133
class C:
21342134
i: int = 0
21352135
self.assertEqual(C().i, 0)
21362136

2137-
dataclass(init=False)
2137+
@dataclass(init=False)
21382138
class C:
21392139
i: int = 2
21402140
def __init__(self):

0 commit comments

Comments
 (0)