dvcignore loading back in constructor

This commit is contained in:
pawel
2019-12-30 14:19:43 +01:00
parent f4ee01cffe
commit aa613f9e6f
2 changed files with 1 additions and 9 deletions
-2
View File
@@ -75,8 +75,6 @@ class DvcIgnoreFilter(object):
def __init__(self, tree):
self.tree = tree
self.ignores = {DvcIgnoreDirs([".git", ".hg", ".dvc"])}
def reload(self):
self._update(self.tree.tree_root)
for root, dirs, _ in self.tree.walk(
self.tree.tree_root, dvcignore=self
+1 -7
View File
@@ -14,9 +14,6 @@ class BaseTree(object):
def tree_root(self):
pass
def set_dvcignore(self, dvcignore):
self.dvcignore = dvcignore
def open(self, path, mode="r", encoding="utf-8"):
"""Open file and return a stream."""
@@ -85,13 +82,10 @@ class CleanTree(BaseTree):
def __init__(self, tree):
super(CleanTree, self).__init__()
self.tree = tree
self._dvcignore = DvcIgnoreFilter(self.tree)
self.tree.set_dvcignore(self._dvcignore)
@cached_property
def dvcignore(self):
self._dvcignore.reload()
return self._dvcignore
return DvcIgnoreFilter(self.tree)
@property
def tree_root(self):