From c1983dcf98bc057e46979af469122905426361ba Mon Sep 17 00:00:00 2001 From: Lucas Biaggi Date: Thu, 1 Aug 2024 10:31:44 +0100 Subject: [PATCH 1/2] Remove unnecessary * from ignore pattern --- doorstop/core/vcs/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorstop/core/vcs/base.py b/doorstop/core/vcs/base.py index ed553bfdc..ac67ca6d2 100644 --- a/doorstop/core/vcs/base.py +++ b/doorstop/core/vcs/base.py @@ -78,7 +78,7 @@ def ignores(self): for line in common.read_lines(path): pattern = line.strip(" @\\/*\n") if pattern and not pattern.startswith("#"): - self._ignores_cache.append("*" + pattern + "*") + self._ignores_cache.append(pattern + "*") yield from self._ignores_cache @property From 396bcaa3847dc5df00413c6f381b522949ae4dcb Mon Sep 17 00:00:00 2001 From: Lucas Biaggi Date: Thu, 1 Aug 2024 10:42:24 +0100 Subject: [PATCH 2/2] fix(core/vcs/tests): Remove * from the beginning --- doorstop/core/vcs/tests/test_all.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doorstop/core/vcs/tests/test_all.py b/doorstop/core/vcs/tests/test_all.py index 16a05e381..450f4d915 100644 --- a/doorstop/core/vcs/tests/test_all.py +++ b/doorstop/core/vcs/tests/test_all.py @@ -20,5 +20,5 @@ def test_ignores(self): patterns = list(self.wc.ignores) for pattern in patterns: print(pattern) - self.assertIn("*__pycache__*", patterns) - self.assertIn("*build*", patterns) + self.assertIn("__pycache__*", patterns) + self.assertIn("build*", patterns)