From 1c9f5a4ede10db47c997617f5430f133371beab1 Mon Sep 17 00:00:00 2001 From: Siddharth Narayanan Date: Thu, 5 Sep 2024 22:30:21 +0000 Subject: [PATCH] accounting for missing typing.override in 3.11 --- ldp/graph/pydantic_patch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ldp/graph/pydantic_patch.py b/ldp/graph/pydantic_patch.py index 29cedf86..49f86d48 100644 --- a/ldp/graph/pydantic_patch.py +++ b/ldp/graph/pydantic_patch.py @@ -1,5 +1,14 @@ import sys -from typing import Generic, override + +if sys.version_info >= (3, 12): + from typing import Generic, override +else: + from typing import Generic + + # python <= 3.11 does not provide typing.override + def override(func): + return func + from pydantic import BaseModel