Skip to content

Commit

Permalink
remove Buffer type to make it compatible with python 3.10 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiqin-Aiven committed Sep 22, 2023
1 parent 1769e1b commit 585a367
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rohmu/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from itertools import islice
from rohmu.typing import HasFileno
from typing import BinaryIO, Generator, Iterable, Optional, Tuple, TypeVar, Union
from typing_extensions import Buffer

import fcntl
import logging
Expand Down Expand Up @@ -205,10 +204,10 @@ def seek(self, offset: int, whence: int = 0) -> int:
def truncate(self, size: Optional[int] = None) -> int:
raise UnsupportedOperation("truncate")

def write(self, s: Union[bytes, Buffer]) -> int:
def write(self, s: bytes) -> int: # type: ignore
raise UnsupportedOperation("write")

def writelines(self, __lines: Union[Iterable[bytes], Iterable[Buffer]]) -> None:
def writelines(self, __lines: Iterable[bytes]) -> None: # type: ignore
raise UnsupportedOperation("writelines")

def fileno(self) -> int:
Expand Down

0 comments on commit 585a367

Please sign in to comment.