[Chore] Replace all base64 usages with faster pybase64 package (#37290)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
@@ -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'.",
|
||||
|
||||
Reference in New Issue
Block a user