File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
tests/resources/example_db/subjects/example_subject Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change 11import json
22from dataclasses import dataclass , field
33from pathlib import Path
4- from typing import List , Optional
4+ from typing import Optional
55
66from openlifu .io .dict_conversion import DictMixin
77from openlifu .util .strings import sanitize
@@ -19,7 +19,6 @@ class Subject(DictMixin):
1919 """
2020 id : Optional [str ] = None
2121 name : Optional [str ] = None
22- volumes : List [str ] = field (default_factory = list )
2322 attrs : dict = field (default_factory = dict )
2423
2524 def __post_init__ (self ):
@@ -29,10 +28,6 @@ def __post_init__(self):
2928 self .id = sanitize (self .name , "snake" )
3029 if self .name is None :
3130 self .name = self .id
32- if isinstance (self .volumes , str ):
33- self .volumes = [self .volumes ]
34- else :
35- self .volumes = list (self .volumes )
3631
3732 @staticmethod
3833 def from_file (filename ):
Original file line number Diff line number Diff line change 11{
22 "id" : " example_subject" ,
33 "name" : " Example Subject" ,
4- "volumes" : [" example_volume" ],
54 "attrs" : {}
65}
You can’t perform that action at this time.
0 commit comments