Skip to content

Commit c7dd960

Browse files
committed
fix nodes.Attachments
1 parent 106270c commit c7dd960

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bioimageio/core/resource_io/nodes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pathlib
22
from dataclasses import dataclass
33
from pathlib import Path
4-
from typing import Callable, Dict, List, Tuple, Union
4+
from typing import Any, Callable, Dict, List, Tuple, Union
55

66
from marshmallow import missing
77
from marshmallow.utils import _Missing
@@ -177,7 +177,8 @@ class TensorflowSavedModelBundleWeightsEntry(Node, model_raw_nodes.TensorflowSav
177177

178178
@dataclass
179179
class Attachments(Node, model_raw_nodes.Attachments):
180-
files: List[Path] = missing
180+
files: Union[_Missing, List[Path]] = missing
181+
unknown: Union[_Missing, Dict[str, Any]] = missing
181182

182183

183184
WeightsEntry = Union[
@@ -192,7 +193,7 @@ class Attachments(Node, model_raw_nodes.Attachments):
192193

193194
@dataclass
194195
class Model(model_raw_nodes.Model, RDF, Node):
195-
authors: List[Author] = missing # type: ignore # base RDF has List[Union[Author, str]], but should change soon
196+
authors: List[Author] = missing
196197
maintainers: Union[_Missing, List[Maintainer]] = missing
197198
test_inputs: List[Path] = missing
198199
test_outputs: List[Path] = missing

0 commit comments

Comments
 (0)