make file arg optional
This commit is contained in:
parent
59519eae3b
commit
07173e4999
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue