From 4f94fd059e241d4204dafe2964bce9fb835bcb6f Mon Sep 17 00:00:00 2001 From: SeoulSKY Date: Mon, 9 Sep 2024 19:01:14 -0600 Subject: [PATCH] Fix ruff error --- ytnoti/models/history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ytnoti/models/history.py b/ytnoti/models/history.py index c56850c..966f0aa 100644 --- a/ytnoti/models/history.py +++ b/ytnoti/models/history.py @@ -115,7 +115,7 @@ async def _truncate(self, channel: Channel) -> None: if not await ospath.exists(path): return - async with aiofiles.open(path, "r", encoding="utf-8") as file: + async with aiofiles.open(path, encoding="utf-8") as file: lines = await file.readlines() async with aiofiles.open(path, "w", encoding="utf-8") as file: @@ -149,7 +149,7 @@ async def has(self, video: Video) -> bool: if not await ospath.exists(path): return False - async with aiofiles.open(path, "r", encoding="utf-8") as file: + async with aiofiles.open(path, encoding="utf-8") as file: async for line in file: if line.strip() == video.id: return True