Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python 3.13 deprecation of typing.re #353

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions linkml_runtime/utils/slot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from dataclasses import dataclass
from typing import Type, List, Optional, Any, re

from rdflib import URIRef

from re import Pattern, Match
from typing import Type, List, Optional, Any, Union

@dataclass
class Slot:
Expand All @@ -15,4 +14,4 @@ class Slot:
domain: Optional[Type]
range: Any
mappings: Optional[List[URIRef]] = None
pattern: Optional[re] = None
pattern: Optional[Union[Pattern, Match]] = None