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
"tools/vscode:/vscode.git/clone" did not exist on "e259d109fea97fbce6f81b3081390fcb99d594fa"
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
...
@@ -4,7 +4,6 @@ import torch
from
sglang.srt.configs.model_config
import
AttentionArch
from
sglang.srt.configs.model_config
import
AttentionArch
from
sglang.srt.layers.attention.flashattention_backend
import
FlashAttentionBackend
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.layers.radix_attention
import
RadixAttention
from
sglang.srt.mem_cache.memory_pool
import
MLATokenToKVPool
from
sglang.srt.mem_cache.memory_pool
import
MLATokenToKVPool
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
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
...
@@ -2,8 +2,6 @@ import unittest
import
torch
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.mem_cache.memory_pool
import
MLATokenToKVPool
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
from
sglang.srt.model_executor.forward_batch_info
import
ForwardBatch
,
ForwardMode
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
...
...
python/sglang/test/few_shot_gsm8k_engine.py
View file @
62797440
import
argparse
import
argparse
import
ast
import
ast
import
asyncio
import
asyncio
import
json
import
re
import
re
import
time
import
time
import
numpy
as
np
import
numpy
as
np
import
sglang
as
sgl
import
sglang
as
sgl
from
sglang.lang.api
import
set_default_backend
from
sglang.utils
import
download_and_cache_file
,
read_jsonl
from
sglang.lang.backend.runtime_endpoint
import
RuntimeEndpoint
from
sglang.utils
import
download_and_cache_file
,
dump_state_text
,
read_jsonl
INVALID
=
-
9999999
INVALID
=
-
9999999
...
...
python/sglang/test/simple_eval_gpqa.py
View file @
62797440
...
@@ -18,7 +18,6 @@ from sglang.test.simple_eval_common import (
...
@@ -18,7 +18,6 @@ from sglang.test.simple_eval_common import (
HTML_JINJA
,
HTML_JINJA
,
Eval
,
Eval
,
EvalResult
,
EvalResult
,
MessageList
,
SamplerBase
,
SamplerBase
,
SingleEvalResult
,
SingleEvalResult
,
format_multichoice_question
,
format_multichoice_question
,
...
...
python/sglang/test/simple_eval_humaneval.py
View file @
62797440
...
@@ -11,8 +11,6 @@ import re
...
@@ -11,8 +11,6 @@ import re
from
concurrent.futures
import
ThreadPoolExecutor
,
as_completed
from
concurrent.futures
import
ThreadPoolExecutor
,
as_completed
from
typing
import
Dict
,
List
,
Optional
from
typing
import
Dict
,
List
,
Optional
import
tqdm
try
:
try
:
from
human_eval.data
import
read_problems
from
human_eval.data
import
read_problems
from
human_eval.evaluation
import
estimate_pass_at_k
from
human_eval.evaluation
import
estimate_pass_at_k
...
@@ -41,7 +39,6 @@ def evaluate_functional_correctness(
...
@@ -41,7 +39,6 @@ def evaluate_functional_correctness(
Evaluates the functional correctness of generated samples, and writes
Evaluates the functional correctness of generated samples, and writes
results to f"{sample_file}_results.jsonl.gz"
results to f"{sample_file}_results.jsonl.gz"
"""
"""
import
copy
# Check the generated samples against test suites.
# Check the generated samples against test suites.
with
ThreadPoolExecutor
(
max_workers
=
n_workers
)
as
executor
:
with
ThreadPoolExecutor
(
max_workers
=
n_workers
)
as
executor
:
...
...
python/sglang/test/test_block_fp8.py
View file @
62797440
import
itertools
import
itertools
import
os
import
unittest
import
unittest
import
torch
import
torch
...
@@ -577,7 +576,7 @@ class TestW8A8BlockFP8BatchedDeepGemm(CustomTestCase):
...
@@ -577,7 +576,7 @@ class TestW8A8BlockFP8BatchedDeepGemm(CustomTestCase):
if
not
torch
.
cuda
.
is_available
():
if
not
torch
.
cuda
.
is_available
():
raise
unittest
.
SkipTest
(
"CUDA is not available"
)
raise
unittest
.
SkipTest
(
"CUDA is not available"
)
try
:
try
:
import
deep_gemm
import
deep_gemm
# noqa: F401
except
ImportError
:
except
ImportError
:
raise
unittest
.
SkipTest
(
"DeepGEMM is not available"
)
raise
unittest
.
SkipTest
(
"DeepGEMM is not available"
)
torch
.
set_default_device
(
"cuda"
)
torch
.
set_default_device
(
"cuda"
)
...
...
python/sglang/test/test_block_fp8_deep_gemm_blackwell.py
View file @
62797440
import
itertools
import
itertools
import
os
import
unittest
import
unittest
from
typing
import
List
,
Tuple
from
typing
import
List
,
Tuple
...
...
python/sglang/test/test_cutlass_moe.py
View file @
62797440
import
argparse
import
argparse
import
time
import
torch
import
torch
import
triton
# Added import
import
triton
# Added import
...
...
python/sglang/test/test_cutlass_w4a8_moe.py
View file @
62797440
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: Apache-2.0
from
typing
import
Literal
,
Optional
from
typing
import
Optional
import
pytest
import
pytest
import
torch
import
torch
...
...
python/sglang/test/test_marlin_moe.py
View file @
62797440
import
types
from
typing
import
Optional
from
typing
import
Optional
import
pytest
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