Skip to content

Commit 809003c

Browse files
committed
Replace NamedTuple with dataclass
1 parent 95539cc commit 809003c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bpython/line.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
import re
88

9+
from dataclasses import dataclass
910
from itertools import chain
10-
from typing import Optional, NamedTuple, Tuple
11+
from typing import Optional, Tuple
1112

1213
from .lazyre import LazyReCompile
1314

1415

15-
class LinePart(NamedTuple):
16+
@dataclass
17+
class LinePart:
1618
start: int
1719
stop: int
1820
word: str

0 commit comments

Comments
 (0)