diff options
author | Jean Abou-Samra <jean@abou-samra.fr> | 2023-02-01 23:26:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 23:26:15 +0100 |
commit | 54c68421de5037e7e0e5e3168b90543966933b19 (patch) | |
tree | 5cf832f2fed4d89b1719671a81c21315765dcb9b /scripts | |
parent | 9d561d47ad32e5290708d7a290bac45d54ab9688 (diff) | |
download | pygments-git-54c68421de5037e7e0e5e3168b90543966933b19.tar.gz |
Fix some pyflakes lints in tests/ and scripts/ (#2333)
Diffstat (limited to 'scripts')
-rw-r--r--[-rwxr-xr-x] | scripts/count_token_references.py | 4 | ||||
-rwxr-xr-x | scripts/debug_lexer.py | 3 | ||||
-rw-r--r-- | scripts/gen_mapfiles.py | 1 |
3 files changed, 3 insertions, 5 deletions
diff --git a/scripts/count_token_references.py b/scripts/count_token_references.py index 08083677..1cf37648 100755..100644 --- a/scripts/count_token_references.py +++ b/scripts/count_token_references.py @@ -197,10 +197,10 @@ def print_result(token_references, args): def key(item): return (item[1].count_files(), item[1].count_lines()) - for (token, locations) in sorted(token_references.items(), key=key): + for (tok, locations) in sorted(token_references.items(), key=key): if args.minfiles <= locations.count_files() <= args.maxfiles and \ args.minlines <= locations.count_lines() <= args.maxlines: - print(f"{token}: {locations}") + print(f"{tok}: {locations}") def main(args=None): diff --git a/scripts/debug_lexer.py b/scripts/debug_lexer.py index 6323d9c3..9bf14a81 100755 --- a/scripts/debug_lexer.py +++ b/scripts/debug_lexer.py @@ -21,8 +21,7 @@ if os.path.isdir(os.path.join(srcpath, 'pygments')): sys.path.insert(0, srcpath) -from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \ - ProfilingRegexLexer, ProfilingRegexLexerMeta +from pygments.lexer import ExtendedRegexLexer, LexerContext from pygments.lexers import get_lexer_by_name, find_lexer_class, \ find_lexer_class_for_filename, guess_lexer from pygments.token import Error, Text, _TokenType diff --git a/scripts/gen_mapfiles.py b/scripts/gen_mapfiles.py index a5aed0ca..0b2f2e9c 100644 --- a/scripts/gen_mapfiles.py +++ b/scripts/gen_mapfiles.py @@ -10,7 +10,6 @@ from importlib import import_module from pathlib import Path -import re import sys top_src_dir = Path(__file__).parent.parent |