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

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

Issue 753543006: pylint: upgrade to 1.4.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « third_party/logilab/astroid/brain/py2pytest.py ('k') | third_party/logilab/astroid/brain/py2stdlib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/astroid/brain/py2qt4.py
diff --git a/third_party/logilab/astroid/brain/py2qt4.py b/third_party/logilab/astroid/brain/py2qt4.py
index 0ee0410e3d03f658581ff851956ff20ffd0abb94..d557809769ba8e2d27421af6f81d1e6517c96fe7 100644
--- a/third_party/logilab/astroid/brain/py2qt4.py
+++ b/third_party/logilab/astroid/brain/py2qt4.py
@@ -5,21 +5,18 @@ Currently help understanding of :
* PyQT4.QtCore
"""
-from astroid import MANAGER
+from astroid import MANAGER, register_module_extender
from astroid.builder import AstroidBuilder
-def pyqt4_qtcore_transform(module):
- fake = AstroidBuilder(MANAGER).string_build('''
+def pyqt4_qtcore_transform():
+ return AstroidBuilder(MANAGER).string_build('''
def SIGNAL(signal_name): pass
class QObject(object):
def emit(self, signal): pass
''')
- for klass in ('QObject',):
- module.locals[klass] = fake.locals[klass]
-import py2stdlib
-py2stdlib.MODULE_TRANSFORMS['PyQt4.QtCore'] = pyqt4_qtcore_transform
+register_module_extender(MANAGER, 'PyQt4.QtCore', pyqt4_qtcore_transform)
« no previous file with comments | « third_party/logilab/astroid/brain/py2pytest.py ('k') | third_party/logilab/astroid/brain/py2stdlib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698