diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_sources.py | 4 | ||||
-rw-r--r-- | scripts/detect_missing_analyse_text.py | 2 | ||||
-rwxr-xr-x | scripts/find_codetags.py | 2 | ||||
-rwxr-xr-x | scripts/find_error.py | 11 |
4 files changed, 10 insertions, 9 deletions
diff --git a/scripts/check_sources.py b/scripts/check_sources.py index e1c7544d..d9e5c2ae 100755 --- a/scripts/check_sources.py +++ b/scripts/check_sources.py @@ -7,7 +7,7 @@ Make sure each Python file has a correct file header including copyright and license information. - :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -30,7 +30,7 @@ def checker(*suffixes, **kwds): name_mail_re = r'[\w ]+(<.*?>)?' -copyright_re = re.compile(r'^ :copyright: Copyright 2006-2012 by ' +copyright_re = re.compile(r'^ :copyright: Copyright 2006-2013 by ' r'the Pygments team, see AUTHORS\.$', re.UNICODE) copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' % (name_mail_re, name_mail_re), re.UNICODE) diff --git a/scripts/detect_missing_analyse_text.py b/scripts/detect_missing_analyse_text.py index fc3fef71..1312648f 100644 --- a/scripts/detect_missing_analyse_text.py +++ b/scripts/detect_missing_analyse_text.py @@ -8,6 +8,8 @@ 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" for f in filenames: if f not in uses: uses[f] = [] diff --git a/scripts/find_codetags.py b/scripts/find_codetags.py index 35db143f..2fb18333 100755 --- a/scripts/find_codetags.py +++ b/scripts/find_codetags.py @@ -7,7 +7,7 @@ Find code tags in specified files and/or directories and create a report in HTML format. - :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/scripts/find_error.py b/scripts/find_error.py index 453f16ed..00923569 100755 --- a/scripts/find_error.py +++ b/scripts/find_error.py @@ -8,17 +8,16 @@ the text where Error tokens are being generated, along with some context. - :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys, os -try: - import pygments -except ImportError: - # try parent path - sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +# always prefer Pygments from source if exists +srcpath = os.path.join(os.path.dirname(__file__), '..') +if os.path.isdir(os.path.join(srcpath, 'pygments')): + sys.path.insert(0, srcpath) from pygments.lexer import RegexLexer |