Skip to content

Commit

Permalink
Merge pull request #128 from pycompression/issue127
Browse files Browse the repository at this point in the history
Write returns number of written bytes
  • Loading branch information
marcelm authored Oct 3, 2023
2 parents 8b1094e + a72fa3e commit b5a67ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def _open_process(
process = Popen(program_args + extra_args, **kwargs) # type: ignore
return process

def write(self, arg: AnyStr) -> None:
self._file.write(arg)
def write(self, arg: AnyStr) -> int:
return self._file.write(arg)

def close(self) -> None:
if self.closed:
Expand Down

0 comments on commit b5a67ee

Please sign in to comment.