Skip to content

Commit

Permalink
Documentation and minor code tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Dec 8, 2024
1 parent 15d2315 commit 55a155e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions benqprojector/benqconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ async def open(self) -> bool:
raise NotImplementedError

def is_open(self):
if self._writer is not None:
return True

return False
"""
Checks if the connection is open.
"""
return self._writer is not None

async def close(self) -> bool:
"""
Expand All @@ -80,6 +80,9 @@ async def close(self) -> bool:
return False

async def reset(self) -> bool:
"""
Resets the reader and drains the writer of the connection.
"""
await self.read(-1)
await self._writer.drain()
return True
Expand Down

0 comments on commit 55a155e

Please sign in to comment.