diff options
author | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:58:58 +0000 |
---|---|---|
committer | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:58:58 +0000 |
commit | 336dc9f7200909200036c80685f9703f40ecd238 (patch) | |
tree | a18e33f30ede25ebfc833ed661edb88014114484 /scripts/check_sources.py | |
parent | b17601caa391fc3587960e160c57eb96c2dde3e0 (diff) | |
parent | bce3a972a54517884bcbd45e09e0d3e911fe53d7 (diff) | |
download | pygments-git-336dc9f7200909200036c80685f9703f40ecd238.tar.gz |
Merged in roskakori/pygments-vbscript (pull request #673)
Added lexer for VBScript
Diffstat (limited to 'scripts/check_sources.py')
-rwxr-xr-x | scripts/check_sources.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/check_sources.py b/scripts/check_sources.py index 4f5926f6..c0524b6c 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-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -36,7 +36,7 @@ def checker(*suffixes, **kwds): name_mail_re = r'[\w ]+(<.*?>)?' -copyright_re = re.compile(r'^ :copyright: Copyright 2006-2015 by ' +copyright_re = re.compile(r'^ :copyright: Copyright 2006-2017 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) @@ -185,7 +185,8 @@ def main(argv): print("Checking %s..." % fn) try: - lines = open(fn, 'rb').read().decode('utf-8').splitlines() + with open(fn, 'rb') as f: + lines = f.read().decode('utf-8').splitlines() except (IOError, OSError) as err: print("%s: cannot open: %s" % (fn, err)) num += 1 |