From 8861369c9dac78e43c123ba958a5815dc824aff6 Mon Sep 17 00:00:00 2001 From: Jay Chung Date: Wed, 18 Oct 2023 18:45:27 +0800 Subject: [PATCH] chore: Type constants final and inherit enum related from https://peps.python.org/pep-0591/ --- src/stmdency/constants.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/stmdency/constants.py b/src/stmdency/constants.py index 33ad630..931901b 100644 --- a/src/stmdency/constants.py +++ b/src/stmdency/constants.py @@ -1,4 +1,8 @@ -class TOKEN: +from enum import Enum +from typing import Final + + +class TOKEN(str, Enum): """Constants Token.""" - EXTRACTOR_NEW_LINE = "\n\n" + EXTRACTOR_NEW_LINE: Final[str] = "\n\n"