From e239f6140832eba70284cb7003261da08d7925de Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Fri, 6 Mar 2026 10:17:00 +0100 Subject: [PATCH] style: apply black and isort formatting Run formatting tools on Phase 1 changes: - black (code formatter) - isort (import sorter) - ruff (linter) All linting checks pass. --- backend/innercontext/models/__init__.py | 2 +- backend/main.py | 2 +- backend/tests/test_products_pricing.py | 3 ++- backend/tests/test_routines_helpers.py | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/innercontext/models/__init__.py b/backend/innercontext/models/__init__.py index 7cad5ee..4287754 100644 --- a/backend/innercontext/models/__init__.py +++ b/backend/innercontext/models/__init__.py @@ -23,6 +23,7 @@ from .enums import ( UsageFrequency, ) from .health import LabResult, MedicationEntry, MedicationUsage +from .pricing import PricingRecalcJob from .product import ( ActiveIngredient, Product, @@ -33,7 +34,6 @@ from .product import ( ProductPublic, ProductWithInventory, ) -from .pricing import PricingRecalcJob from .profile import UserProfile from .routine import GroomingSchedule, Routine, RoutineStep from .skincare import ( diff --git a/backend/main.py b/backend/main.py index 370a06b..10fb73b 100644 --- a/backend/main.py +++ b/backend/main.py @@ -14,8 +14,8 @@ from innercontext.api import ( # noqa: E402 ai_logs, health, inventory, - profile, products, + profile, routines, skincare, ) diff --git a/backend/tests/test_products_pricing.py b/backend/tests/test_products_pricing.py index c8284fc..84d0068 100644 --- a/backend/tests/test_products_pricing.py +++ b/backend/tests/test_products_pricing.py @@ -1,10 +1,11 @@ import uuid +from sqlmodel import select + from innercontext.api import products as products_api from innercontext.models import PricingRecalcJob, Product from innercontext.models.enums import DayTime, ProductCategory from innercontext.services.pricing_jobs import process_one_pending_pricing_job -from sqlmodel import select def _product( diff --git a/backend/tests/test_routines_helpers.py b/backend/tests/test_routines_helpers.py index 40cce52..7619425 100644 --- a/backend/tests/test_routines_helpers.py +++ b/backend/tests/test_routines_helpers.py @@ -10,7 +10,6 @@ from innercontext.api.routines import ( _build_products_context, _build_recent_history, _build_skin_context, - build_product_details_tool_handler, _contains_minoxidil_text, _ev, _extract_active_names, @@ -18,6 +17,7 @@ from innercontext.api.routines import ( _filter_products_by_interval, _get_available_products, _is_minoxidil_product, + build_product_details_tool_handler, ) from innercontext.models import ( GroomingSchedule, @@ -444,7 +444,8 @@ def test_filter_products_by_interval(): ) last_used = { - str(p_interval_72.id): today - timedelta(days=1), # used yesterday -> need 3 days + str(p_interval_72.id): today + - timedelta(days=1), # used yesterday -> need 3 days str(p_interval_48.id): today - timedelta(days=3), # used 3 days ago -> 48h ok }