diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-20 23:36:29 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-20 23:36:29 +0200 |
| commit | 6d297cbec48e9026ddf31d2ff95df7c182572dc9 (patch) | |
| tree | 77e0dd82cbcfa6c48fffeeb24f6c31ec62510bfa /Tools | |
| parent | cac1d236a24e2755c05103d485a3b42a884b5a45 (diff) | |
| download | cpython-git-6d297cbec48e9026ddf31d2ff95df7c182572dc9.tar.gz | |
Issue #26581: Use the first coding cookie on a line, not the last one.
Diffstat (limited to 'Tools')
| -rwxr-xr-x | Tools/scripts/findnocoding.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py index 70b1a66613..79ea7e5534 100755 --- a/Tools/scripts/findnocoding.py +++ b/Tools/scripts/findnocoding.py @@ -32,7 +32,7 @@ except ImportError: "no sophisticated Python source file search will be done.") -decl_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)') +decl_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') blank_re = re.compile(r'^[ \t\f]*(?:[#\r\n]|$)') def get_declaration(line): |
