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

Unified Diff: third_party/logilab/logilab/astroid/brain/py2mechanize.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/py2mechanize.py
diff --git a/third_party/logilab/logilab/astroid/brain/py2mechanize.py b/third_party/logilab/logilab/astroid/brain/py2mechanize.py
new file mode 100644
index 0000000000000000000000000000000000000000..20a253a4580468c580d81a6befdb9a9b7e2f6b0a
--- /dev/null
+++ b/third_party/logilab/logilab/astroid/brain/py2mechanize.py
@@ -0,0 +1,18 @@
+from astroid import MANAGER, register_module_extender
+from astroid.builder import AstroidBuilder
+
+def mechanize_transform():
+ return AstroidBuilder(MANAGER).string_build('''
+
+class Browser(object):
+ def open(self, url, data=None, timeout=None):
+ return None
+ def open_novisit(self, url, data=None, timeout=None):
+ return None
+ def open_local_file(self, filename):
+ return None
+
+''')
+
+
+register_module_extender(MANAGER, 'mechanize', mechanize_transform)
« no previous file with comments | « third_party/logilab/logilab/astroid/brain/py2gi.py ('k') | third_party/logilab/logilab/astroid/brain/py2pytest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698