This commit is contained in:
Justus Kuhlmann 2025-12-04 11:34:43 +01:00
commit 28ea48ad66
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -3,7 +3,7 @@ from configparser import ConfigParser
from .trackers import datalad as dl
def get_tracker(path):
def get_tracker(path: str) -> str:
config_path = os.path.join(path, '.corrlib')
config = ConfigParser()
if os.path.exists(config_path):
@ -12,7 +12,7 @@ def get_tracker(path):
return tracker
def get(path, file):
def get(path: str, file: str) -> None:
tracker = get_tracker(path)
if tracker == 'datalad':
dl.get_file(path, file)
@ -21,7 +21,7 @@ def get(path, file):
return
def save(path, message, files):
def save(path: str, message: str, files: list[str]) -> None:
tracker = get_tracker(path)
if tracker == 'datalad':
dl.save(files, message=message, dataset=path)