From f862922a49550627dd640c0a1e7cef2ba57e9940 Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:49:18 -0500 Subject: [PATCH] Ruff rule updates --- pyproject.toml | 3 +-- src/statusbot/update.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6d676c3..0127071 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,7 +111,6 @@ select = [ "SIM", # flake8-simplify "SLOT", # flake8-slots "TCH", # flake8-type-checking - "TRIO", # flake8-trio "UP", # pyupgrade "W", # Warning "YTT", # flake8-2020 @@ -123,7 +122,7 @@ extend-ignore = [ "D204", # blank line thing "D211", # no-blank-line-before-class "D213", # multi-line-summary-second-line - "TRIO109", # trio-async-function-with-timeout + "ASYNC109", # trio-async-function-with-timeout ] [tool.ruff.lint.per-file-ignores] diff --git a/src/statusbot/update.py b/src/statusbot/update.py index b407d1e..1b3bc0d 100644 --- a/src/statusbot/update.py +++ b/src/statusbot/update.py @@ -127,7 +127,7 @@ async def update_file( url = get_address(user, repo, branch, path) savepath = os.path.abspath(os.path.join(basepath, *(path.split("/")))) try: - with open(savepath, "wb") as sfile: + with open(savepath, "wb") as sfile: # noqa: ASYNC230 sfile.write( await download_coroutine(url, timeout, **sessionkwargs), ) @@ -160,7 +160,7 @@ async def update_single(path: str) -> str: # Ensure folder for it exists too. make_dirpath_exist(savepath) url = urlbase + path - with open(savepath, "wb") as sfile: + with open(savepath, "wb") as sfile: # noqa: ASYNC230 sfile.write( await download_coroutine(url, timeout, **sessionkwargs), )