Код: Выделить всё
def readinto(self, b: bytearray) -> int:
n, size = 0, len(b)
while n < size:
try:
b[n] = next(self._it)
except StopIteration:
break
n += 1
return n
Неожиданный тип(ы): (int, bytes) Возможные типы: (SupportsIndex,
SupportsIndex) (slice, Iterable[SupportsIndex] | bytes)
I Я совершенно запутался: почему индекс массива b должен быть типа SupportsIndex? Есть ли проблемы с простым int?

Подробнее здесь: https://stackoverflow.com/questions/771 ... portsindex