summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/findnocoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/findnocoding.py')
-rwxr-xr-xTools/scripts/findnocoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py
index 5f3795e..6c16b1c 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.", file=sys.stderr)
-decl_re = re.compile(rb'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
+decl_re = re.compile(rb'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)')
blank_re = re.compile(rb'^[ \t\f]*(?:[#\r\n]|$)')
def get_declaration(line):