From d08c64305c99e72bf51d77923bee4b55894181c7 Mon Sep 17 00:00:00 2001 From: Jessica Smith <12jessicasmith34@gmail.com> Date: Mon, 23 Sep 2024 23:20:02 -0500 Subject: [PATCH] fix(classes.py): remove usage of Self type hint for compatibility with older Python versions --- src/otf_api/models/responses/classes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/otf_api/models/responses/classes.py b/src/otf_api/models/responses/classes.py index e389e74..58629aa 100644 --- a/src/otf_api/models/responses/classes.py +++ b/src/otf_api/models/responses/classes.py @@ -1,6 +1,6 @@ from datetime import datetime from enum import Enum -from typing import ClassVar, Self +from typing import ClassVar from humanize import precisedelta from pydantic import Field @@ -18,7 +18,7 @@ class DoW(str, Enum): sunday = "sunday" @classmethod - def get_case_insensitive(cls, value: str) -> Self: + def get_case_insensitive(cls, value: str) -> "DoW": lcase_to_actual = {item.value.lower(): item for item in cls} return lcase_to_actual[value.lower()]