make file arg optional

This commit is contained in:
Justus Kuhlmann 2025-12-04 12:04:46 +01:00
commit 07173e4999
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -1,6 +1,7 @@
import os import os
from configparser import ConfigParser from configparser import ConfigParser
from .trackers import datalad as dl from .trackers import datalad as dl
from typing import Optional
def get_tracker(path: str) -> str: def get_tracker(path: str) -> str:
@ -21,7 +22,7 @@ def get(path: str, file: str) -> None:
return return
def save(path: str, message: str, files: list[str]) -> None: def save(path: str, message: str, files: Optional[list[str]]=None) -> None:
tracker = get_tracker(path) tracker = get_tracker(path)
if tracker == 'datalad': if tracker == 'datalad':
dl.save(path, message, files) dl.save(path, message, files)