Skip to content

Commit 04105c8

Browse files
committed
test_stripe: Convert NamedTuple to dataclass.
The locally defined NamedTuple was triggering a mypy caching bug (python/mypy#10913), and we don’t use the tuple behavior anyway. Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 9968fb5 commit 04105c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

corporate/tests/test_stripe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from dataclasses import dataclass
12
import json
23
import operator
34
import os
@@ -13,7 +14,6 @@
1314
Dict,
1415
List,
1516
Mapping,
16-
NamedTuple,
1717
Optional,
1818
Sequence,
1919
Tuple,
@@ -2834,7 +2834,8 @@ def create_realm(
28342834
invoices = self.create_invoices(customer, num_invoices)
28352835
return realm, customer, plan, invoices
28362836

2837-
class Row(NamedTuple):
2837+
@dataclass
2838+
class Row:
28382839
realm: Realm
28392840
expected_plan_type: int
28402841
plan: Optional[CustomerPlan]

0 commit comments

Comments
 (0)