From bdc67b7896948bcce84dbc4c926040c54dcd45e1 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Thu, 5 Feb 2026 11:44:39 +0100 Subject: [PATCH] ruff 0.15 with python target 3.11 --- .pre-commit-config.yaml | 2 +- prepare_locales_catalog.py | 1 + pyproject.toml | 2 +- requirements_dev.txt | 2 +- smoke_test/test_2_methods.py | 18 +++++++++--------- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3f10ee..3572db0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.14.0 + rev: v0.15.0 hooks: # Run the linter. - id: ruff diff --git a/prepare_locales_catalog.py b/prepare_locales_catalog.py index 01bbfc4..46e5e0d 100644 --- a/prepare_locales_catalog.py +++ b/prepare_locales_catalog.py @@ -4,6 +4,7 @@ and copy it to the same directory as this file. Run `python prepare_locales_catalog.py` and this script will create the articles.{locale}.json files under bring-api/locales. """ + import glob import json import os diff --git a/pyproject.toml b/pyproject.toml index 19c4548..5877aef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ Issues = "https://github.com/miaucl/bring-api/issues" "Release notes" = "https://github.com/miaucl/bring-api/releases" [tool.ruff] -target-version = "py314" +target-version = "py311" # Python 3.11 [tool.ruff.lint] select = [ diff --git a/requirements_dev.txt b/requirements_dev.txt index f6c3782..4d19719 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -3,7 +3,7 @@ mypy>=1.8.0 pydantic>=2.9.2 pre-commit>=3.6.1 python-dotenv>=1.0.1 -ruff~=0.14 +ruff~=0.15 mkdocs-material==9.7.1 mkdocstrings[python]==1.0.2 mashumaro>=3.13.1 diff --git a/smoke_test/test_2_methods.py b/smoke_test/test_2_methods.py index 886f830..1cc23db 100644 --- a/smoke_test/test_2_methods.py +++ b/smoke_test/test_2_methods.py @@ -76,15 +76,15 @@ async def test_translation(self, bring: Bring, test_list: BringList) -> None: } for k, v in test_items.items(): # Save an item an item to - bring.user_list_settings[str(test_list.listUuid)][ - "listArticleLanguage" - ] = locale_to + bring.user_list_settings[str(test_list.listUuid)]["listArticleLanguage"] = ( + locale_to + ) await bring.save_item(test_list.listUuid, v) # Get all the pending items of a list - bring.user_list_settings[str(test_list.listUuid)][ - "listArticleLanguage" - ] = locale_from + bring.user_list_settings[str(test_list.listUuid)]["listArticleLanguage"] = ( + locale_from + ) items = await bring.get_list(test_list.listUuid) item = next(ii.itemId for ii in items.items.purchase if ii.itemId == k) assert item == k @@ -93,9 +93,9 @@ async def test_translation(self, bring: Bring, test_list: BringList) -> None: await bring.remove_item(test_list.listUuid, k) # reset locale to original value for other tests - bring.user_list_settings[str(test_list.listUuid)][ - "listArticleLanguage" - ] = locale_org + bring.user_list_settings[str(test_list.listUuid)]["listArticleLanguage"] = ( + locale_org + ) async def test_batch_list_operations( self, bring: Bring, test_list: BringList