diff options
author | Erlend E. Aasland <erlend@python.org> | 2023-12-22 22:35:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-22 22:35:16 (GMT) |
commit | 9c3ddf31a34295ebcef6dc49b9e0ddd75d0ea9f1 (patch) | |
tree | 28760a54b45193435ea10af890970c7706605a33 /Tools/clinic | |
parent | d1c711e757213b38cff177ba4b4d8ae201da1d21 (diff) | |
download | cpython-9c3ddf31a34295ebcef6dc49b9e0ddd75d0ea9f1.zip cpython-9c3ddf31a34295ebcef6dc49b9e0ddd75d0ea9f1.tar.gz cpython-9c3ddf31a34295ebcef6dc49b9e0ddd75d0ea9f1.tar.bz2 |
gh-113317: Remove TextAccumulator type alias from clinic.py (#113413)
Clean-up after gh-113402.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 4b00902..92092e9 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2342,9 +2342,6 @@ class BlockPrinter: self.f.write(text) -TextAccumulator = list[str] - - class BufferSeries: """ Behaves like a "defaultlist". @@ -2358,13 +2355,13 @@ class BufferSeries: def __init__(self) -> None: self._start = 0 - self._array: list[TextAccumulator] = [] + self._array: list[list[str]] = [] - def __getitem__(self, i: int) -> TextAccumulator: + def __getitem__(self, i: int) -> list[str]: i -= self._start if i < 0: self._start += i - prefix: list[TextAccumulator] = [[] for x in range(-i)] + prefix: list[list[str]] = [[] for x in range(-i)] self._array = prefix + self._array i = 0 while i >= len(self._array): @@ -2563,7 +2560,7 @@ impl_definition block 'impl_definition': d('block'), } - DestBufferType = dict[str, TextAccumulator] + DestBufferType = dict[str, list[str]] DestBufferList = list[DestBufferType] self.destination_buffers_stack: DestBufferList = [] @@ -2635,7 +2632,7 @@ impl_definition block self, name: str, item: int = 0 - ) -> TextAccumulator: + ) -> list[str]: d = self.get_destination(name) return d.buffers[item] |