Skip to content

Commit da9b455

Browse files
authored
Replace NamedTuple with plain class (#267)
1 parent 97aebb7 commit da9b455

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blacken_docs/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import textwrap
77
from typing import Generator
88
from typing import Match
9-
from typing import NamedTuple
109
from typing import Sequence
1110

1211
import black
@@ -88,9 +87,10 @@
8887
TRAILING_NL_RE = re.compile(r"\n+\Z", re.MULTILINE)
8988

9089

91-
class CodeBlockError(NamedTuple):
92-
offset: int
93-
exc: Exception
90+
class CodeBlockError:
91+
def __init__(self, offset: int, exc: Exception) -> None:
92+
self.offset = offset
93+
self.exc = exc
9494

9595

9696
def format_str(

0 commit comments

Comments
 (0)