diff --git a/linkml_runtime/loaders/loader_root.py b/linkml_runtime/loaders/loader_root.py index 4b2b3cd2..6cce4de2 100644 --- a/linkml_runtime/loaders/loader_root.py +++ b/linkml_runtime/loaders/loader_root.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from pathlib import Path, PosixPath +from pathlib import Path from typing import TextIO, Union, Optional, Callable, Dict, Type, Any, List from logging import getLogger @@ -84,7 +84,7 @@ def load_as_dict(self, *args, **kwargs) -> Union[dict, List[dict]]: raise NotImplementedError() @abstractmethod - def load_any(self, source: Union[str, dict, TextIO, PosixPath], target_class: Type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, + def load_any(self, source: Union[str, dict, TextIO, Path], target_class: Type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: """ Load source as an instance of target_class, or list of instances of target_class