Skip to content

Commit c5adf26

Browse files
gh-104050: Argument Clinic: Annotate the BufferSeries class (#106935)
Co-authored-by: Alex Waygood <[email protected]>
1 parent f8f16d0 commit c5adf26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tools/clinic/clinic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,12 +1965,12 @@ class BufferSeries:
19651965
e.g. o[-1] is an element immediately preceding o[0].
19661966
"""
19671967

1968-
def __init__(self):
1968+
def __init__(self) -> None:
19691969
self._start = 0
1970-
self._array = []
1970+
self._array: list[_TextAccumulator] = []
19711971
self._constructor = _text_accumulator
19721972

1973-
def __getitem__(self, i):
1973+
def __getitem__(self, i: int) -> _TextAccumulator:
19741974
i -= self._start
19751975
if i < 0:
19761976
self._start += i
@@ -1981,11 +1981,11 @@ def __getitem__(self, i):
19811981
self._array.append(self._constructor())
19821982
return self._array[i]
19831983

1984-
def clear(self):
1984+
def clear(self) -> None:
19851985
for ta in self._array:
19861986
ta.text.clear()
19871987

1988-
def dump(self):
1988+
def dump(self) -> str:
19891989
texts = [ta.output() for ta in self._array]
19901990
return "".join(texts)
19911991

0 commit comments

Comments
 (0)