Steve Canny cbe1b35621
rfctr(chunk): prep for adding TableSplitter (#3510)
**Summary**
Mechanical refactoring in preparation for adding (pre-chunk)
`TableSplitter` in a PR stacked on this one.
2024-08-12 18:04:49 +00:00

21 lines
578 B
Python

from __future__ import annotations
from os import PathLike
from typing import Protocol, TypeVar
from typing_extensions import TypeAlias
AnyStr_cov = TypeVar("AnyStr_cov", str, bytes, covariant=True)
FilePath: TypeAlias = str | PathLike[str]
S1 = TypeVar("S1")
class BaseBuffer(Protocol):
@property
def mode(self) -> str: ...
def seek(self, __offset: int, __whence: int = ...) -> int: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
class ReadBuffer(BaseBuffer, Protocol[AnyStr_cov]):
def read(self, __n: int = ...) -> AnyStr_cov: ...