Compare commits

..

2 commits

Author SHA1 Message Date
1264a09ed0
change cached to be string
All checks were successful
Mypy / mypy (push) Successful in 44s
Pytest / pytest (3.12) (push) Successful in 50s
Pytest / pytest (3.13) (push) Successful in 47s
Pytest / pytest (3.14) (push) Successful in 49s
Ruff / ruff (push) Successful in 34s
2025-12-04 12:09:26 +01:00
294df0a6c9
cleaner implementation 2025-12-04 12:07:42 +01:00
2 changed files with 2 additions and 4 deletions

View file

@ -50,7 +50,7 @@ def _create_config(path: str) -> None:
'toml_imports_path': os.path.join(path, 'toml_imports'), 'toml_imports_path': os.path.join(path, 'toml_imports'),
'import_scripts_path': os.path.join(path, 'import_scripts'), 'import_scripts_path': os.path.join(path, 'import_scripts'),
'tracker': 'datalad', 'tracker': 'datalad',
'cached': True, 'cached': 'True',
} }
with open(os.path.join(path, '.corrlib'), 'w') as configfile: with open(os.path.join(path, '.corrlib'), 'w') as configfile:
config.write(configfile) config.write(configfile)

View file

@ -14,9 +14,7 @@ def get(path: str, file: str) -> None:
def save(path: str, message: str, files: Optional[list[str]]=None) -> None: def save(path: str, message: str, files: Optional[list[str]]=None) -> None:
if files is None: if files is not None:
files = path
else:
files = [os.path.join(path, f) for f in files] files = [os.path.join(path, f) for f in files]
dl.save(files, message=message, dataset=path) dl.save(files, message=message, dataset=path)
return return