summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2013-01-22 12:01:53 -0500
committerJoe Gordon <jogo@cloudscaling.com>2013-01-23 11:02:46 -0500
commit886f9811ab95bce82f088de4178c0993450c5cea (patch)
treeaa7aa628c1289b9cb51eb5b72f7b110dc0a98574 /tools
parentcf7f75d66ca8e20e1058758ce5f0fb9859f413de (diff)
Allow update.py to copy tools
With first tool: flakes.py Change-Id: Ie7880927c74ceff174b3b0d2730c499790650921
Diffstat (limited to 'tools')
-rw-r--r--tools/flakes.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/flakes.py b/tools/flakes.py
new file mode 100644
index 0000000..4c9d820
--- /dev/null
+++ b/tools/flakes.py
@@ -0,0 +1,13 @@
+"""
+ wrapper for pyflakes to ignore gettext based warning:
+ "undefined name '_'"
+"""
+import sys
+
+import pyflakes.checker
+from pyflakes.scripts.pyflakes import main
+
+if __name__ == "__main__":
+ orig_builtins = set(pyflakes.checker._MAGIC_GLOBALS)
+ pyflakes.checker._MAGIC_GLOBALS = orig_builtins | set(['_'])
+ sys.exit(main())