[Lint] Add python/sglang to ruff F401 checks and remove unused imports in files (#11685)

This commit is contained in:
Chang Su
2025-10-17 16:49:46 -07:00
committed by GitHub
parent 2614adf9ca
commit 627974405d
150 changed files with 124 additions and 405 deletions
@@ -56,7 +56,7 @@ from sglang.srt.utils import (
)
if is_cuda():
from sgl_kernel import segment_packbits
from sgl_kernel import segment_packbits # noqa: F401
logger = logging.getLogger(__name__)
SGLANG_RETURN_ORIGINAL_LOGPROB = get_bool_env_var("SGLANG_RETURN_ORIGINAL_LOGPROB")
@@ -22,8 +22,6 @@ from sglang.srt.managers.schedule_batch import Req
from sglang.srt.utils import is_cuda, is_hip
if TYPE_CHECKING:
from sglang.srt.mem_cache.allocator import TokenToKVPoolAllocator
from sglang.srt.mem_cache.memory_pool import ReqToTokenPool
from sglang.srt.speculative.eagle_info import EagleVerifyInput
@@ -11,7 +11,7 @@ from sglang.srt.speculative.spec_utils import draft_tp_context, load_token_map
from sglang.srt.utils import empty_context, get_bool_env_var, is_cuda
if is_cuda():
from sgl_kernel import segment_packbits
from sgl_kernel import segment_packbits # noqa: F401
logger = logging.getLogger(__name__)
SGLANG_RETURN_ORIGINAL_LOGPROB = get_bool_env_var("SGLANG_RETURN_ORIGINAL_LOGPROB")