From f2606fe0ca6a472f1c0362d1666bbbfe4869882f Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 10 Oct 2026 20:27:52 +0200 Subject: [PATCH] deps: flutter 3.47.7, crdt-sync 0.9.2, freedays 0.3.1, pydantic 2.14.0, ruff 0.17.0 ruff 0.17 stabilised CPY001 (ignored: no per-file copyright headers here), ISC004 and ICN001 (autofixed). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015npsYVB2PdtWkG7MPAi4tn --- .fvmrc | 2 +- .github/workflows/release-apk.yml | 2 +- app/pubspec.yaml | 2 +- diet_guard/_body_report.py | 18 ++++++++++++------ diet_guard/_cli_log.py | 6 ++++-- diet_guard/tests/test_kuchnia_client.py | 4 ++-- diet_guard/tests/test_kuchnia_gate.py | 6 +++--- diet_guard/tests/test_kuchnia_import.py | 6 +++--- diet_guard/tests/test_kuchnia_orders.py | 4 ++-- pyproject.toml | 6 ++++-- requirements.txt | 8 ++++---- 11 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.fvmrc b/.fvmrc index 9bc5a0b..6b3d30c 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,3 +1,3 @@ { - "flutter": "3.47.6" + "flutter": "3.47.7" } diff --git a/.github/workflows/release-apk.yml b/.github/workflows/release-apk.yml index 4a736f5..1f6c3d5 100644 --- a/.github/workflows/release-apk.yml +++ b/.github/workflows/release-apk.yml @@ -60,7 +60,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.47.6 + flutter-version: 3.47.7 channel: stable cache: true diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 8f744de..0fcc2ed 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -2,7 +2,7 @@ name: diet_guard_app description: "Companion phone app for diet_guard: log meals on the go." publish_to: 'none' -version: 1.0.110+1 +version: 1.0.111+1 environment: sdk: ^3.12.2 diff --git a/diet_guard/_body_report.py b/diet_guard/_body_report.py index e3663d2..db625b5 100644 --- a/diet_guard/_body_report.py +++ b/diet_guard/_body_report.py @@ -72,8 +72,10 @@ def bodyfat_lines(view: BodyView) -> list[str]: return ["Body fat: not logged (log one to use Katch-McArdle)."] day = max(view.body_fats) return [ - f"Body fat: {_num(view.body_fats[day], 1)}% on {day} " - f"({len(view.body_fats)} readings) -- targets use Katch-McArdle." + ( + f"Body fat: {_num(view.body_fats[day], 1)}% on {day} " + f"({len(view.body_fats)} readings) -- targets use Katch-McArdle." + ) ] @@ -85,8 +87,10 @@ def bmi_lines(view: BodyView) -> list[str]: low, high = view.numbers.healthy return [ f"BMI {_num(bmi.bmi, 1)} ({bmi.category})", - f"Healthy weight for your height (BMI 18.5-24.9): " - f"{_num(low, 1)}-{_num(high, 1)} kg", + ( + f"Healthy weight for your height (BMI 18.5-24.9): " + f"{_num(low, 1)}-{_num(high, 1)} kg" + ), f"BMI Prime {_num(bmi.prime, 2)} Trefethen {_num(bmi.trefethen, 1)}", *_wrap(BMI_PRIME_NOTE, " "), *_wrap(TREFETHEN_NOTE, " "), @@ -141,8 +145,10 @@ def target_lines(view: BodyView) -> list[str]: target = view.numbers.target if target.kcal is None or target.tdee is None: return [ - f"{goal_sentence(view.goal)}: no workouts published yet " - "(the PC publishes them on sync)." + ( + f"{goal_sentence(view.goal)}: no workouts published yet " + "(the PC publishes them on sync)." + ) ] lines = [f"{goal_sentence(view.goal)} eat {target.kcal} kcal a day."] if target.below_floor: diff --git a/diet_guard/_cli_log.py b/diet_guard/_cli_log.py index 2d113e2..cb87c59 100644 --- a/diet_guard/_cli_log.py +++ b/diet_guard/_cli_log.py @@ -103,8 +103,10 @@ def eaten_grams( if unit is None: return ( portion.count * DEFAULT_ITEM_GRAMS, - f"(assumed {DEFAULT_ITEM_GRAMS:g} g per item; " - "pass --grams to be exact)", + ( + f"(assumed {DEFAULT_ITEM_GRAMS:g} g per item; " + "pass --grams to be exact)" + ), ) return portion.count * unit, None return portion.grams, None diff --git a/diet_guard/tests/test_kuchnia_client.py b/diet_guard/tests/test_kuchnia_client.py index 679d83f..eeba929 100644 --- a/diet_guard/tests/test_kuchnia_client.py +++ b/diet_guard/tests/test_kuchnia_client.py @@ -7,7 +7,7 @@ through ``sys.modules`` instead of binding it at import time. from __future__ import annotations -import datetime +import datetime as dt import json from typing import TYPE_CHECKING from unittest.mock import patch @@ -28,7 +28,7 @@ from diet_guard.tests._kuchnia_fakes import ( if TYPE_CHECKING: from pathlib import Path -DAY = datetime.date(2026, 8, 22) +DAY = dt.date(2026, 8, 22) @pytest.fixture diff --git a/diet_guard/tests/test_kuchnia_gate.py b/diet_guard/tests/test_kuchnia_gate.py index 488e11b..3ba2263 100644 --- a/diet_guard/tests/test_kuchnia_gate.py +++ b/diet_guard/tests/test_kuchnia_gate.py @@ -15,7 +15,7 @@ is testable with no thread at all. from __future__ import annotations -import datetime +import datetime as dt import queue from types import SimpleNamespace from typing import TYPE_CHECKING @@ -38,7 +38,7 @@ if TYPE_CHECKING: from diet_guard._estimator import Nutrition -DAY = datetime.date(2026, 8, 22) +DAY = dt.date(2026, 8, 22) def _dish(name: str = "Kaszotto", priority: int = 1) -> Dish: @@ -68,7 +68,7 @@ class TestWorker: def test_a_raising_call_still_feeds_the_queue(self) -> None: # Without the finally, the poll waits forever with the button disabled # and the user cannot get out from behind the lock. - def boom(_day: datetime.date) -> tuple[Sequence[Dish], str | None]: + def boom(_day: dt.date) -> tuple[Sequence[Dish], str | None]: msg = "kaboom" raise RuntimeError(msg) diff --git a/diet_guard/tests/test_kuchnia_import.py b/diet_guard/tests/test_kuchnia_import.py index 4612846..9b1a97c 100644 --- a/diet_guard/tests/test_kuchnia_import.py +++ b/diet_guard/tests/test_kuchnia_import.py @@ -9,7 +9,7 @@ that happens, so these assert on **call count** instead. from __future__ import annotations -import datetime +import datetime as dt from unittest.mock import patch from diet_guard import _kuchnia_config, _kuchnia_import @@ -21,7 +21,7 @@ from diet_guard._kuchnia_parse import Dish from diet_guard._kuchnia_spread import SlottedDish from diet_guard._state_today import today_entries, today_total_kcal -DAY = datetime.date(2026, 8, 22) +DAY = dt.date(2026, 8, 22) def _dish(name: str = "Kaszotto", kcal: float = 391.0, priority: int = 1) -> Dish: @@ -150,7 +150,7 @@ class TestRefreshOnce: return_value=([_dish()], None), ) as refresh: _kuchnia_import.refresh_delivery_once(DAY) - _kuchnia_import.refresh_delivery_once(DAY + datetime.timedelta(days=1)) + _kuchnia_import.refresh_delivery_once(DAY + dt.timedelta(days=1)) assert refresh.call_count == 2 def test_an_outage_does_not_suppress_the_retry(self) -> None: diff --git a/diet_guard/tests/test_kuchnia_orders.py b/diet_guard/tests/test_kuchnia_orders.py index 547d5a2..327f611 100644 --- a/diet_guard/tests/test_kuchnia_orders.py +++ b/diet_guard/tests/test_kuchnia_orders.py @@ -10,7 +10,7 @@ The endpoint shape here is not the obvious one: ``.../deliveries/{id}/details`` from __future__ import annotations -import datetime +import datetime as dt from unittest.mock import patch import pytest @@ -28,7 +28,7 @@ from diet_guard.tests._kuchnia_fakes import ( write_credentials, ) -DAY = datetime.date(2026, 8, 22) +DAY = dt.date(2026, 8, 22) @pytest.fixture diff --git a/pyproject.toml b/pyproject.toml index b77203e..a63aa28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,8 @@ description = "Tkinter/systemd log-to-unlock meal gate with calorie/macro budget requires-python = ">=3.14" dependencies = [ "gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock", - "crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.1#subdirectory=crdt-sync", - "freedays @ git+https://github.com/kuhyx/utils@freedays-v0.3.0#subdirectory=freedays", + "crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync", + "freedays @ git+https://github.com/kuhyx/utils@freedays-v0.3.1#subdirectory=freedays", "defusedxml==0.7.1", "requests==2.34.2", ] @@ -37,6 +37,8 @@ ignore = [ "COM812", "ISC001", "S603", + # Stabilised in ruff 0.17; this personal repo carries no per-file copyright headers. + "CPY001", ] fixable = ["ALL"] unfixable = [] diff --git a/requirements.txt b/requirements.txt index ad59a87..eade505 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,14 +3,14 @@ bandit==1.9.4 codespell==2.4.3 coverage==7.16.2 -crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.1#subdirectory=crdt-sync +crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.9.2#subdirectory=crdt-sync defusedxml==0.7.1 -freedays @ git+https://github.com/kuhyx/utils@freedays-v0.3.0#subdirectory=freedays +freedays @ git+https://github.com/kuhyx/utils@freedays-v0.3.1#subdirectory=freedays gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.9.0#subdirectory=gatelock mcp==2.3.0 mypy==2.4.0 pre-commit==4.6.2 -pydantic==2.13.5 +pydantic==2.14.0 pylint==4.1.2 pytest==9.1.1 pytest-cov==7.1.0 @@ -19,4 +19,4 @@ pytest-sugar==1.1.1 pytest-xdist==3.8.0 pytest-xvfb==3.1.1 requests==2.34.2 -ruff==0.16.10 +ruff==0.17.0