Skip to content

Commit 9756ac0

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 9756ac0

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
@@ -4,6 +4,7 @@
44
import random
55
import re
66
import sys
7+
from dataclasses import dataclass
78
from datetime import datetime, timedelta, timezone
89
from decimal import Decimal
910
from functools import wraps
@@ -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)