Skip to content

Commit

Permalink
lint src/base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Kudrow committed Nov 11, 2024
1 parent 137c856 commit 6b242b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/aiofiles/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __repr__(self):
async def __anext__(self):
"""Simulate normal file iteration."""

if (line := await self.readline()):
if line := await self.readline():
return line
raise StopAsyncIteration

Expand Down Expand Up @@ -62,10 +62,6 @@ async def __aenter__(self):

async def __aexit__(self, exc_type, exc_val, exc_tb):
await get_running_loop().run_in_executor(
None,
self._obj._file.__exit__,
exc_type,
exc_val,
exc_tb,
None, self._obj._file.__exit__, exc_type, exc_val, exc_tb
)
self._obj = None

0 comments on commit 6b242b9

Please sign in to comment.