Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
62797440
Unverified
Commit
62797440
authored
Oct 17, 2025
by
Chang Su
Committed by
GitHub
Oct 17, 2025
Browse files
[Lint] Add `python/sglang` to ruff F401 checks and remove unused imports in files (#11685)
parent
2614adf9
Changes
150
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
3 additions
and
17 deletions
+3
-17
python/sglang/test/attention/test_flashattn_mla_backend.py
python/sglang/test/attention/test_flashattn_mla_backend.py
+0
-1
python/sglang/test/attention/test_prefix_chunk_info.py
python/sglang/test/attention/test_prefix_chunk_info.py
+0
-2
python/sglang/test/few_shot_gsm8k_engine.py
python/sglang/test/few_shot_gsm8k_engine.py
+1
-4
python/sglang/test/simple_eval_gpqa.py
python/sglang/test/simple_eval_gpqa.py
+0
-1
python/sglang/test/simple_eval_humaneval.py
python/sglang/test/simple_eval_humaneval.py
+0
-3
python/sglang/test/test_block_fp8.py
python/sglang/test/test_block_fp8.py
+1
-2
python/sglang/test/test_block_fp8_deep_gemm_blackwell.py
python/sglang/test/test_block_fp8_deep_gemm_blackwell.py
+0
-1
python/sglang/test/test_cutlass_moe.py
python/sglang/test/test_cutlass_moe.py
+0
-1
python/sglang/test/test_cutlass_w4a8_moe.py
python/sglang/test/test_cutlass_w4a8_moe.py
+1
-1
python/sglang/test/test_marlin_moe.py
python/sglang/test/test_marlin_moe.py
+0
-1
No files found.
python/sglang/test/attention/test_flashattn_mla_backend.py
View file @
62797440
...
...
@@ -4,7 +4,6 @@ import torch
from
sglang.srt.configs.model_config
import
AttentionArch
from
sglang.srt.layers.attention.flashattention_backend
import
FlashAttentionBackend
from
sglang.srt.layers.attention.torch_native_backend
import
TorchNativeAttnBackend
from
sglang.srt.layers.radix_attention
import
RadixAttention
from
sglang.srt.mem_cache.memory_pool
import
MLATokenToKVPool
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
...
...
python/sglang/test/attention/test_prefix_chunk_info.py
View file @
62797440
...
...
@@ -2,8 +2,6 @@ import unittest
import
torch
from
sglang.srt.layers.attention.flashattention_backend
import
FlashAttentionBackend
from
sglang.srt.layers.radix_attention
import
RadixAttention
from
sglang.srt.mem_cache.memory_pool
import
MLATokenToKVPool
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
from
sglang.test.test_utils
import
CustomTestCase
...
...
python/sglang/test/few_shot_gsm8k_engine.py
View file @
62797440
import
argparse
import
ast
import
asyncio
import
json
import
re
import
time
import
numpy
as
np
import
sglang
as
sgl
from
sglang.lang.api
import
set_default_backend
from
sglang.lang.backend.runtime_endpoint
import
RuntimeEndpoint
from
sglang.utils
import
download_and_cache_file
,
dump_state_text
,
read_jsonl
from
sglang.utils
import
download_and_cache_file
,
read_jsonl
INVALID
=
-
9999999
...
...
python/sglang/test/simple_eval_gpqa.py
View file @
62797440
...
...
@@ -18,7 +18,6 @@ from sglang.test.simple_eval_common import (
HTML_JINJA
,
Eval
,
EvalResult
,
MessageList
,
SamplerBase
,
SingleEvalResult
,
format_multichoice_question
,
...
...
python/sglang/test/simple_eval_humaneval.py
View file @
62797440
...
...
@@ -11,8 +11,6 @@ import re
from
concurrent.futures
import
ThreadPoolExecutor
,
as_completed
from
typing
import
Dict
,
List
,
Optional
import
tqdm
try
:
from
human_eval.data
import
read_problems
from
human_eval.evaluation
import
estimate_pass_at_k
...
...
@@ -41,7 +39,6 @@ def evaluate_functional_correctness(
Evaluates the functional correctness of generated samples, and writes
results to f"{sample_file}_results.jsonl.gz"
"""
import
copy
# Check the generated samples against test suites.
with
ThreadPoolExecutor
(
max_workers
=
n_workers
)
as
executor
:
...
...
python/sglang/test/test_block_fp8.py
View file @
62797440
import
itertools
import
os
import
unittest
import
torch
...
...
@@ -577,7 +576,7 @@ class TestW8A8BlockFP8BatchedDeepGemm(CustomTestCase):
if
not
torch
.
cuda
.
is_available
():
raise
unittest
.
SkipTest
(
"CUDA is not available"
)
try
:
import
deep_gemm
import
deep_gemm
# noqa: F401
except
ImportError
:
raise
unittest
.
SkipTest
(
"DeepGEMM is not available"
)
torch
.
set_default_device
(
"cuda"
)
...
...
python/sglang/test/test_block_fp8_deep_gemm_blackwell.py
View file @
62797440
import
itertools
import
os
import
unittest
from
typing
import
List
,
Tuple
...
...
python/sglang/test/test_cutlass_moe.py
View file @
62797440
import
argparse
import
time
import
torch
import
triton
# Added import
...
...
python/sglang/test/test_cutlass_w4a8_moe.py
View file @
62797440
# SPDX-License-Identifier: Apache-2.0
from
typing
import
Literal
,
Optional
from
typing
import
Optional
import
pytest
import
torch
...
...
python/sglang/test/test_marlin_moe.py
View file @
62797440
import
types
from
typing
import
Optional
import
pytest
...
...
Prev
1
…
4
5
6
7
8
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment