[gnome-builder/wip/chergert/pipeline-merge: 18/64] todo: simplify ignored files to use a helper func
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/pipeline-merge: 18/64] todo: simplify ignored files to use a helper func
- Date: Sun, 5 Feb 2017 21:50:53 +0000 (UTC)
commit b29ff254413217c238d20f64b3fe4e2a485ce989
Author: Christian Hergert <chergert redhat com>
Date: Fri Feb 3 12:23:35 2017 -0800
todo: simplify ignored files to use a helper func
plugins/todo/todo_plugin/__init__.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/todo/todo_plugin/__init__.py b/plugins/todo/todo_plugin/__init__.py
index 0bc0096..2afd70c 100644
--- a/plugins/todo/todo_plugin/__init__.py
+++ b/plugins/todo/todo_plugin/__init__.py
@@ -89,6 +89,9 @@ class TodoWorkbenchAddin(GObject.Object, Ide.WorkbenchAddin):
# can be navigated to quickly.
self.mine(file, prepend=True)
+ def _is_ignored_pattern(self, name):
+ return name.endswith('.m4') or name.endswith('.in')
+
def _post_from_main(self, args):
items, prepend = args
@@ -97,7 +100,7 @@ class TodoWorkbenchAddin(GObject.Object, Ide.WorkbenchAddin):
for item in items:
file = item.props.file
- if vcs.is_ignored(file) or file.get_basename().endswith('.m4'):
+ if vcs.is_ignored(file) or self._is_ignored_pattern(file.get_basename()):
continue
self.panel.add_item(item, prepend=prepend)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]