[gnome-builder/wip/chergert/layout] jedi: ignore non-gir files



commit 524c2f812e742b10acad58b0174933e0f2b9ac4e
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 6 14:32:52 2017 -0700

    jedi: ignore non-gir files
    
    The rnc file is now shipped here, so ignore that when going
    through the directory contents.

 plugins/jedi/jedi_plugin.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/jedi/jedi_plugin.py b/plugins/jedi/jedi_plugin.py
index d257680..25ade14 100644
--- a/plugins/jedi/jedi_plugin.py
+++ b/plugins/jedi/jedi_plugin.py
@@ -280,6 +280,8 @@ class DocumentationDB(object):
         # I would use scandir for better performance, but it requires newer Python
         for gir_path in GIR_PATH_LIST:
             for gir_file in os.listdir(gir_path):
+                if not gir_file.endswith('.gir'):
+                    continue
                 if gir_file in processed_gir_files:
                     continue
                 processed_gir_files[gir_file] = None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]