diff options
author | thatch <devnull@localhost> | 2008-09-24 21:00:05 -0700 |
---|---|---|
committer | thatch <devnull@localhost> | 2008-09-24 21:00:05 -0700 |
commit | e4eb439164fd41ae18aff84b552c58f081d9be30 (patch) | |
tree | ee3c09e87f52de7d6fb86e2d4d0801fe98936fd6 /scripts | |
parent | 09b1546f75c77abe09e508747f9aaecc4f56655a (diff) | |
download | pygments-e4eb439164fd41ae18aff84b552c58f081d9be30.tar.gz |
check_sources should be unicode-aware when checking copyright info
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_sources.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/check_sources.py b/scripts/check_sources.py index 654e24a0..f9f0bd13 100755 --- a/scripts/check_sources.py +++ b/scripts/check_sources.py @@ -31,9 +31,9 @@ def checker(*suffixes, **kwds): name_mail_re = r'[\w ]+(<.*?>)?' copyright_re = re.compile(r'^ :copyright: 200\d(-200\d)? by %s(, %s)*[,.]$' % - (name_mail_re, name_mail_re)) + (name_mail_re, name_mail_re), re.UNICODE) copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' % - (name_mail_re, name_mail_re)) + (name_mail_re, name_mail_re), re.UNICODE) coding_re = re.compile(r'coding[:=]\s*([-\w.]+)') not_ix_re = re.compile(r'\bnot\s+\S+?\s+i[sn]\s\S+') is_const_re = re.compile(r'if.*?==\s+(None|False|True)\b') @@ -130,7 +130,7 @@ def check_fileheader(fn, lines): yield 0, "no correct license info" ci = -3 - copyright = llist[ci:ci+1] + copyright = [s.decode('utf-8') for s in llist[ci:ci+1]] while copyright and copyright_2_re.match(copyright[0]): ci -= 1 copyright = llist[ci:ci+1] |