[Chore] Replace all base64 usages with faster pybase64 package (#37290)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Isotr0py
2026-03-17 22:44:19 +08:00
committed by GitHub
parent 3717a4dd47
commit a836524d20
37 changed files with 46 additions and 40 deletions

View File

@@ -59,6 +59,14 @@ CHECK_IMPORTS = {
"vllm/v1/serial_utils.py",
},
),
"base64": ForbiddenImport(
pattern=r"^\s*(?:import\s+base64(?:$|\s|,)|from\s+base64\s+import)",
tip=(
"Replace 'import base64' with 'import pybase64' "
"or 'import pybase64 as base64'."
),
allowed_pattern=re.compile(r"^\s*import\s+pybase64(\s*|\s+as\s+base64\s*)$"),
),
"re": ForbiddenImport(
pattern=r"^\s*(?:import\s+re(?:$|\s|,)|from\s+re\s+import)",
tip="Replace 'import re' with 'import regex as re' or 'import regex'.",