Compare commits

...

2 commits

Author SHA1 Message Date
b0ef8c3fc0
use init, not create
Some checks failed
Mypy / mypy (push) Failing after 44s
Pytest / pytest (3.12) (push) Successful in 50s
Pytest / pytest (3.13) (push) Successful in 47s
Pytest / pytest (3.14) (push) Successful in 48s
Ruff / ruff (push) Successful in 33s
2025-12-04 12:05:17 +01:00
07173e4999
make file arg optional 2025-12-04 12:04:46 +01:00
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,5 @@
from configparser import ConfigParser
import sqlite3
import datalad.api as dl
import os
from .tracker import save, init
@ -63,7 +62,7 @@ def create(path: str) -> None:
Create folder of backlogs.
"""
create(path)
init(path)
_create_db(os.path.join(path, 'backlogger.db'))
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
_create_config(path)

View file

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