Skip to content

Commit

Permalink
Fix typo in test_dataclasses.py (pythongh-95735)
Browse files Browse the repository at this point in the history
`dataclass` was called as a function when it was almost certainly intended to be a decorator.
  • Loading branch information
da-woods authored Aug 6, 2022
1 parent 15f4a35 commit 59e09ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -2215,12 +2215,12 @@ class C(B):
self.assertEqual(c.z, 100)

def test_no_init(self):
dataclass(init=False)
@dataclass(init=False)
class C:
i: int = 0
self.assertEqual(C().i, 0)

dataclass(init=False)
@dataclass(init=False)
class C:
i: int = 2
def __init__(self):
Expand Down

0 comments on commit 59e09ef

Please sign in to comment.