Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: third_party/logilab/logilab/astroid/brain/py2qt4.py

Issue 1920403002: [content/test/gpu] Run pylint check of gpu tests in unittest instead of PRESUBMIT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update path to LICENSE.txt of logilab/README.chromium Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/logilab/logilab/astroid/brain/py2qt4.py
diff --git a/third_party/logilab/logilab/astroid/brain/py2qt4.py b/third_party/logilab/logilab/astroid/brain/py2qt4.py
new file mode 100644
index 0000000000000000000000000000000000000000..d557809769ba8e2d27421af6f81d1e6517c96fe7
--- /dev/null
+++ b/third_party/logilab/logilab/astroid/brain/py2qt4.py
@@ -0,0 +1,22 @@
+"""Astroid hooks for the Python 2 qt4 module.
+
+Currently help understanding of :
+
+* PyQT4.QtCore
+"""
+
+from astroid import MANAGER, register_module_extender
+from astroid.builder import AstroidBuilder
+
+
+def pyqt4_qtcore_transform():
+ return AstroidBuilder(MANAGER).string_build('''
+
+def SIGNAL(signal_name): pass
+
+class QObject(object):
+ def emit(self, signal): pass
+''')
+
+
+register_module_extender(MANAGER, 'PyQt4.QtCore', pyqt4_qtcore_transform)
« no previous file with comments | « third_party/logilab/logilab/astroid/brain/py2pytest.py ('k') | third_party/logilab/logilab/astroid/brain/py2stdlib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698