Skip to content

Commit 7b66c10

Browse files
committed
add type annotation for source
1 parent ac78e48 commit 7b66c10

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bioimageio/spec/shared/_resolve_source.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,13 @@ def _resolve_source_importable_path(
317317
)
318318

319319

320-
def get_resolved_source_path(source, root_path: typing.Union[os.PathLike, URI], pbar=None) -> pathlib.Path:
320+
def get_resolved_source_path(
321+
source: typing.Union[
322+
raw_nodes.URI, str, pathlib.Path, raw_nodes.ResolvedImportableSourceFile, raw_nodes.ImportableSourceFile
323+
],
324+
root_path: typing.Union[os.PathLike, URI],
325+
pbar=None,
326+
) -> pathlib.Path:
321327
resolved = resolve_source(source, root_path=root_path, pbar=pbar)
322328
if isinstance(resolved, os.PathLike):
323329
return pathlib.Path(resolved)

0 commit comments

Comments
 (0)