Skip to content

Commit

Permalink
accounting for missing typing.override in 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sidnarayanan committed Sep 5, 2024
1 parent d25ec6d commit 1c9f5a4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ldp/graph/pydantic_patch.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 1c9f5a4

Please sign in to comment.