Skip to content

Commit

Permalink
Make writebytes() lintable by mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Nov 13, 2017
1 parent 4082d26 commit 961be76
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions px/px_top.py
Expand Up @@ -127,11 +127,8 @@ def get_toplist(baseline):


def writebytes(bytestring):
if sys.version_info.major == 2:
sys.stdout.write(bytestring)
else:
# http://stackoverflow.com/a/908440/473672
sys.stdout.buffer.write(bytestring)
# type: (bytes) -> None
os.write(sys.stdout.fileno(), bytestring)


def clear_screen():
Expand Down

0 comments on commit 961be76

Please sign in to comment.