From 8ce9a09aa1379b95eb75b31653f4341ba81b266e Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Tue, 2 Sep 2025 12:12:52 -0400 Subject: [PATCH] RFC-4: use Literal for anatomical type --- rfc/4/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rfc/4/index.md b/rfc/4/index.md index 08975c95..1512ed6f 100644 --- a/rfc/4/index.md +++ b/rfc/4/index.md @@ -262,6 +262,7 @@ In Pydantic: ```python from enum import Enum +from typing import Literal from pydantic import BaseModel class AnatomicalOrientationValue(str, Enum): @@ -316,7 +317,7 @@ class AnatomicalOrientation(Orientation): """ Anatomical orientation specific implementation. """ - type: str = "anatomical" + type: Literal["anatomical"] value: AnatomicalOrientationValue ```