Skip to content

Commit

Permalink
FIXUP: please black linter
Browse files Browse the repository at this point in the history
  • Loading branch information
deeplow committed Jun 7, 2023
1 parent b45bf78 commit 3e207d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dangerzone/conversion/doc_to_pixels_qubes_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ def _write_text(text: str, file=sys.stdout):
def _write_int(num: int, file=sys.stdout):
_write_bytes(num.to_bytes(2, signed=False), file=file)


# ==== ASYNC METHODS ====
# We run sync methods in async wrappers, because pure async methods are more difficult:
# https://stackoverflow.com/a/52702646
#
# In practice, because they are I/O bound and we don't have many running concurrently,
# they shouldn't cause a problem.


async def read_bytes() -> bytes:
return await asyncio.to_thread(_read_bytes)

Expand Down

0 comments on commit 3e207d3

Please sign in to comment.