[gnome-builder] python: fix warnings from gi
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] python: fix warnings from gi
- Date: Fri, 4 Sep 2015 20:14:56 +0000 (UTC)
commit 5dd1661172235fdf30dad4a88ce4b5f0dff5e77b
Author: Christian Hergert <christian hergert me>
Date: Fri Sep 4 13:14:14 2015 -0700
python: fix warnings from gi
Just some annoying runtime warnings.
.../python_gi_imports_completion.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/python-gi-imports-completion/python_gi_imports_completion.py
b/plugins/python-gi-imports-completion/python_gi_imports_completion.py
index 3790796..03e916a 100644
--- a/plugins/python-gi-imports-completion/python_gi_imports_completion.py
+++ b/plugins/python-gi-imports-completion/python_gi_imports_completion.py
@@ -20,6 +20,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+import gi
+import os
+
+gi.require_version('Gtk', '3.0')
+gi.require_version('GtkSource', '3.0')
+gi.require_version('GIRepository', '2.0')
+gi.require_version('Ide', '1.0')
+
from gi.repository import GIRepository
from gi.repository import GLib
from gi.repository import GObject
@@ -27,8 +35,6 @@ from gi.repository import Gtk
from gi.repository import GtkSource
from gi.repository import Ide
-import os
-
# 2 minutes
CACHE_EXPIRE_USEC = 2 * 60 * 1000 * 1000
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]