summaryrefslogtreecommitdiff
path: root/scripts/detect_missing_analyse_text.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-18 13:25:15 +0100
committerGeorg Brandl <georg@python.org>2014-01-18 13:25:15 +0100
commita9169c157a05c82a1b8a7ffb92e7f159fb4ca0f8 (patch)
treeface5db25ebef227315a0ae1080d4b2262f6fe23 /scripts/detect_missing_analyse_text.py
parente921fe0b430608cb7e0c89f7fada9260cb4822eb (diff)
downloadpygments-a9169c157a05c82a1b8a7ffb92e7f159fb4ca0f8.tar.gz
futurizing: move to print_function and "except X as Y" syntax
Diffstat (limited to 'scripts/detect_missing_analyse_text.py')
-rw-r--r--scripts/detect_missing_analyse_text.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/detect_missing_analyse_text.py b/scripts/detect_missing_analyse_text.py
index 1312648f..ac1da06c 100644
--- a/scripts/detect_missing_analyse_text.py
+++ b/scripts/detect_missing_analyse_text.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import sys
from pygments.lexers import get_all_lexers, find_lexer_class
@@ -9,7 +10,7 @@ def main():
for name, aliases, filenames, mimetypes in get_all_lexers():
cls = find_lexer_class(name)
if not cls.aliases:
- print cls, "has no aliases"
+ print(cls, "has no aliases")
for f in filenames:
if f not in uses:
uses[f] = []
@@ -21,10 +22,10 @@ def main():
#print "Multiple for", k, v
for i in v:
if i.analyse_text is None:
- print i, "has a None analyse_text"
+ print(i, "has a None analyse_text")
ret |= 1
elif Lexer.analyse_text.__doc__ == i.analyse_text.__doc__:
- print i, "needs analyse_text, multiple lexers for", k
+ print(i, "needs analyse_text, multiple lexers for", k)
ret |= 2
return ret