From 19c70c43b51c47081d4f7344b49cac0c28c3c3a7 Mon Sep 17 00:00:00 2001 From: rahul4732saini Date: Sun, 3 Nov 2024 13:01:09 +0530 Subject: [PATCH] Add backward compatibility support in fields.py Removed usage of the `Self` class to avoid runtime failures in python versions released before 3.12. --- fise/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fise/fields.py b/fise/fields.py index b96d21f..e921585 100644 --- a/fise/fields.py +++ b/fise/fields.py @@ -6,7 +6,7 @@ for storing and handling query fields. """ -from typing import Self, Any +from typing import Any from abc import ABC, abstractmethod from dataclasses import dataclass @@ -21,7 +21,7 @@ class BaseField(ABC): @classmethod @abstractmethod - def parse(cls, descriptor: str) -> Self: ... + def parse(cls, descriptor: str): ... @abstractmethod def evaluate(self, entity) -> Any: ...