@@ -64,7 +64,7 @@ class LocalRegistry(Registry):
6464
6565 def __init__ (self ) -> None :
6666 # Initialize Pydantic parent with empty data (no meta for local registries)
67- super ().__init__ (meta = None , files = {}, models = {}, examples = {})
67+ super ().__init__ (_meta = None , files = {}, models = {}, examples = {})
6868 # Initialize non-Pydantic tracking variable
6969 self ._paths = set ()
7070
@@ -139,7 +139,9 @@ def copy_to(
139139 return None
140140
141141 # Get actual file paths from FileEntry objects
142- file_paths = [self .files [name ].path for name in file_names ]
142+ file_paths = [
143+ p for name in file_names if (p := self .files [name ].path ) is not None
144+ ]
143145
144146 # create the workspace if needed
145147 workspace = Path (workspace ).expanduser ().absolute ()
@@ -203,7 +205,7 @@ def __init__(
203205 retries : int = 3 ,
204206 ):
205207 # Initialize Pydantic parent with empty data (will be populated by _load())
206- super ().__init__ (meta = None , files = {}, models = {}, examples = {})
208+ super ().__init__ (_meta = None , files = {}, models = {}, examples = {})
207209
208210 # Initialize non-Pydantic instance variables
209211 self ._registry_path = Path (__file__ ).parent .parent / "registry"
@@ -530,10 +532,10 @@ def index(
530532 models_file_path = output_dir / PoochRegistry .models_file_name
531533 examples_file_path = output_dir / PoochRegistry .examples_file_name
532534
533- with registry_file_path .open ("ab+" ) as registry_file :
535+ with registry_file_path .open ("ab+" ) as f :
534536 tomli_w .dump (
535537 remap (dict (sorted (files .items ())), visit = drop_none_or_empty ),
536- registry_file ,
538+ f ,
537539 )
538540
539541 with models_file_path .open ("ab+" ) as models_file :
@@ -628,12 +630,12 @@ def get_examples() -> dict[str, list[str]]:
628630 return DEFAULT_REGISTRY .examples
629631
630632
631- def get_models () -> dict [str , str ]:
633+ def get_models () -> dict [str , list [ str ] ]:
632634 """Get a map of model names to input files."""
633635 return DEFAULT_REGISTRY .models
634636
635637
636- def get_files () -> dict [str , dict [ str , str ] ]:
638+ def get_files () -> dict [str , FileEntry ]:
637639 """
638640 Get a map of file names to URLs. Note that this mapping
639641 contains no information on which files belong to which
0 commit comments