Skip to content

Commit 871ee2d

Browse files
pythongh-113317: Remove TextAccumulator type alias from clinic.py
Clean-up after pythongh-113402.
1 parent d1c711e commit 871ee2d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Tools/clinic/clinic.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,9 +2342,6 @@ def write(self, text: str) -> None:
23422342
self.f.write(text)
23432343

23442344

2345-
TextAccumulator = list[str]
2346-
2347-
23482345
class BufferSeries:
23492346
"""
23502347
Behaves like a "defaultlist".
@@ -2358,13 +2355,13 @@ class BufferSeries:
23582355

23592356
def __init__(self) -> None:
23602357
self._start = 0
2361-
self._array: list[TextAccumulator] = []
2358+
self._array: list[list[str]] = []
23622359

2363-
def __getitem__(self, i: int) -> TextAccumulator:
2360+
def __getitem__(self, i: int) -> list[str]:
23642361
i -= self._start
23652362
if i < 0:
23662363
self._start += i
2367-
prefix: list[TextAccumulator] = [[] for x in range(-i)]
2364+
prefix: list[list[str]] = [[] for x in range(-i)]
23682365
self._array = prefix + self._array
23692366
i = 0
23702367
while i >= len(self._array):
@@ -2563,7 +2560,7 @@ def __init__(
25632560
'impl_definition': d('block'),
25642561
}
25652562

2566-
DestBufferType = dict[str, TextAccumulator]
2563+
DestBufferType = dict[str, list[str]]
25672564
DestBufferList = list[DestBufferType]
25682565

25692566
self.destination_buffers_stack: DestBufferList = []
@@ -2635,7 +2632,7 @@ def get_destination_buffer(
26352632
self,
26362633
name: str,
26372634
item: int = 0
2638-
) -> TextAccumulator:
2635+
) -> list[str]:
26392636
d = self.get_destination(name)
26402637
return d.buffers[item]
26412638

0 commit comments

Comments
 (0)