diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-01 21:20:56 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-03-01 21:20:56 +0100 |
commit | 2c8dec9ece936192aa1bf41496cfa9ead549ac0c (patch) | |
tree | a1bfbf7d25d0bcd8172653d2cb1a2c513c0a1e4d /scripts | |
parent | 6f6232e53cbf89de6c82ae471d5509204114e398 (diff) | |
download | qutebrowser-2c8dec9ece936192aa1bf41496cfa9ead549ac0c.tar.gz qutebrowser-2c8dec9ece936192aa1bf41496cfa9ead549ac0c.zip |
misc_check: Print match instead of pattern
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dev/misc_checks.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 428b5c5e2..91baec926 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -143,10 +143,11 @@ def _check_spelling_file(path, fobj, patterns): ok = True for num, line in enumerate(fobj, start=1): for pattern, explanation in patterns: - if pattern.search(line): + match = pattern.search(line) + if match: ok = False print(f'{path}:{num}: ', end='') - utils.print_col(f'Found "{pattern.pattern}" - {explanation}', 'blue') + utils.print_col(f'Found "{match.group(0)}" - {explanation}', 'blue') return ok |