Skip to content

Commit e882d4a

Browse files
committed
Update candidate_generation.py
1 parent 9249b52 commit e882d4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scispacy/candidate_generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional, List, Dict, Tuple, NamedTuple, Type
1+
from typing import Optional, List, Dict, Tuple, NamedTuple, Type, Union
22
import json
33
import datetime
44
import os.path
@@ -44,7 +44,7 @@ class LinkerPaths(NamedTuple):
4444
concept_aliases_list: str
4545

4646
@classmethod
47-
def from_directory(cls, directory: str | Path) -> Self:
47+
def from_directory(cls, directory: Union[str, Path]) -> Self:
4848
if not os.path.isdir(directory):
4949
raise NotADirectoryError
5050
return cls(

0 commit comments

Comments
 (0)