Skip to content

Commit

Permalink
Add backward compatibility support in fields.py
Browse files Browse the repository at this point in the history
Removed usage of the `Self` class to avoid runtime
failures in python versions released before 3.12.
  • Loading branch information
rahul4732saini committed Nov 3, 2024
1 parent f750703 commit 19c70c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fise/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: ...
Expand Down

0 comments on commit 19c70c4

Please sign in to comment.