From 9a9e508f1fd0519e75117a48e08dc34ac8486393 Mon Sep 17 00:00:00 2001 From: Amr Gaber Date: Mon, 27 Jul 2026 22:50:24 -0500 Subject: [PATCH] Use StrEnum for Condition Ruff's UP042 (active under target-version py314) flags the str+Enum mixin; StrEnum is the modern equivalent and str(member) now yields the value directly. This was the one finding the upgrade left unfixed and it failed lint on main, blocking the deploy pipeline at the CI stage. --- app/schemas/item.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/schemas/item.py b/app/schemas/item.py index 470bf64..1afb4ce 100644 --- a/app/schemas/item.py +++ b/app/schemas/item.py @@ -1,6 +1,6 @@ from datetime import date, datetime from decimal import Decimal -from enum import Enum +from enum import StrEnum from typing import Any from uuid import UUID @@ -13,7 +13,7 @@ from app.schemas.tag import TagRead -class Condition(str, Enum): +class Condition(StrEnum): """Condition of an item.""" EXCELLENT = "excellent"