add: cleanup .gitignore decorator

This commit is contained in:
pared
2019-03-11 22:54:21 +01:00
parent cb10210572
commit 7a01d5fe47
7 changed files with 77 additions and 10 deletions
+6
View File
@@ -1,3 +1,4 @@
import yaml
import os
from dvc.scm import Git
@@ -21,6 +22,11 @@ def get_gitignore_content():
return gitignore.readlines()
def load_stage_file(path):
with open(path, "r") as fobj:
return yaml.safe_load(fobj)
@contextmanager
def cd(newdir):
prevdir = os.getcwd()