[CI/Build] Remove imports of built-in re (#18750)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-05-27 17:19:18 +08:00 committed by GitHub
parent a68e293cb9
commit 4318c0559d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 10 additions and 9 deletions

View File

@ -142,6 +142,7 @@ repos:
language: python language: python
types: [python] types: [python]
pass_filenames: false pass_filenames: false
additional_dependencies: [regex]
# Keep `suggestion` last # Keep `suggestion` last
- id: suggestion - id: suggestion
name: Suggestion name: Suggestion

View File

@ -1,11 +1,11 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import itertools import itertools
import re
from dataclasses import dataclass, field from dataclasses import dataclass, field
from pathlib import Path from pathlib import Path
from typing import Literal from typing import Literal
import regex as re
ROOT_DIR = Path(__file__).parent.parent.parent.parent ROOT_DIR = Path(__file__).parent.parent.parent.parent
ROOT_DIR_RELATIVE = '../../../../..' ROOT_DIR_RELATIVE = '../../../../..'
EXAMPLE_DIR = ROOT_DIR / "examples" EXAMPLE_DIR = ROOT_DIR / "examples"

View File

@ -1,6 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import re import regex as re
from mkdocs.config.defaults import MkDocsConfig from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import Files from mkdocs.structure.files import Files
from mkdocs.structure.pages import Page from mkdocs.structure.pages import Page

View File

@ -5,4 +5,5 @@ mkdocstrings-python
mkdocs-gen-files mkdocs-gen-files
mkdocs-awesome-nav mkdocs-awesome-nav
python-markdown-math python-markdown-math
regex
ruff ruff

View File

@ -1,8 +1,9 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import re
import subprocess import subprocess
import sys import sys
import regex as re
FORBIDDEN_IMPORT_RE = re.compile(r"^(from|import)\s+triton(\s|\.|$)") FORBIDDEN_IMPORT_RE = re.compile(r"^(from|import)\s+triton(\s|\.|$)")
# the way allowed to import triton # the way allowed to import triton

View File

@ -1,11 +1,10 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import ast import ast
import json import json
import re
from collections.abc import Sequence from collections.abc import Sequence
from typing import Any, Union from typing import Any, Union
import regex as re
from transformers import PreTrainedTokenizerBase from transformers import PreTrainedTokenizerBase
from vllm.entrypoints.openai.protocol import (ChatCompletionRequest, from vllm.entrypoints.openai.protocol import (ChatCompletionRequest,

View File

@ -1,8 +1,8 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import json import json
from re import escape as regex_escape
import llguidance import llguidance
from regex import escape as regex_escape
from transformers import PreTrainedTokenizerBase from transformers import PreTrainedTokenizerBase
from vllm.model_executor.guided_decoding.guidance_logits_processors import ( from vllm.model_executor.guided_decoding.guidance_logits_processors import (

View File

@ -5,9 +5,9 @@ import concurrent.futures
import os import os
from enum import Enum from enum import Enum
from json import dumps as json_dumps from json import dumps as json_dumps
from re import escape as regex_escape
from typing import Optional, Union from typing import Optional, Union
from regex import escape as regex_escape
from transformers import PreTrainedTokenizerBase from transformers import PreTrainedTokenizerBase
from vllm.model_executor.guided_decoding.outlines_logits_processors import ( from vllm.model_executor.guided_decoding.outlines_logits_processors import (