Skip to content

Commit 514ec82

Browse files
Fix typo in test_dataclasses.py (gh-95735) (gh-95740)
`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]> Co-authored-by: da-woods <[email protected]>
1 parent 868fb9e commit 514ec82

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
@@ -2215,12 +2215,12 @@ class C(B):
22152215
self.assertEqual(c.z, 100)
22162216

22172217
def test_no_init(self):
2218-
dataclass(init=False)
2218+
@dataclass(init=False)
22192219
class C:
22202220
i: int = 0
22212221
self.assertEqual(C().i, 0)
22222222

2223-
dataclass(init=False)
2223+
@dataclass(init=False)
22242224
class C:
22252225
i: int = 2
22262226
def __init__(self):

0 commit comments

Comments
 (0)