summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2013-02-19 02:30:44 +0800
committerAndy Li <andy@onthewings.net>2013-02-19 02:30:44 +0800
commit565a8ec40162f20a004b826ad339c655f696b45e (patch)
treea4ba4fe5b8874e3305941613034e6f6548bdb6a9 /scripts
parent25273ed077997a0ed8ca8bcf34be7b94e248c5cb (diff)
parent054c464c70c115f476608a51bb0b4a931d1fa400 (diff)
downloadpygments-565a8ec40162f20a004b826ad339c655f696b45e.tar.gz
Merge upstream changes.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check_sources.py4
-rw-r--r--scripts/detect_missing_analyse_text.py2
-rwxr-xr-xscripts/find_codetags.py2
-rwxr-xr-xscripts/find_error.py11
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