From 727e432740eb496daa4b626ac2a997cb005e50a4 Mon Sep 17 00:00:00 2001 From: Username Date: Mon, 16 Feb 2026 20:59:55 +0100 Subject: [PATCH] audit: migrate enums to StrEnum --- app/audit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/audit.py b/app/audit.py index 446afc5..f7c9b4c 100644 --- a/app/audit.py +++ b/app/audit.py @@ -4,7 +4,7 @@ from __future__ import annotations import json import time -from enum import Enum +from enum import StrEnum from typing import TYPE_CHECKING, Any from flask import current_app, g @@ -15,7 +15,7 @@ if TYPE_CHECKING: from sqlite3 import Row -class AuditEvent(str, Enum): +class AuditEvent(StrEnum): """Security-relevant event types for audit logging.""" PASTE_CREATE = "paste_create" @@ -33,7 +33,7 @@ class AuditEvent(str, Enum): URL_DELETE = "url_delete" -class AuditOutcome(str, Enum): +class AuditOutcome(StrEnum): """Outcome types for audit events.""" SUCCESS = "success"