Repository navigation
[CI] lint: Reject importing a name through a module that only re-imports it - #47992
Merged
Merged
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
hnyls2002
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
ch-wan,
ispobock,
merrymercy and
ping1jing2
as code owners
November 2, 2026 23:41
hnyls2002
requested review from
CatherineSue,
JustinTong0323,
Kangyan-Zhou,
ShangmingCai,
alexnails,
alphabetc1,
hzh0425,
kpham-sgl,
liusy58,
mickqian,
pyc96,
sherlockwu,
slin1237,
wisclmy0611,
yhyang201,
yuan-luo and
zijiexia
as code owners
November 3, 2026 03:10
hnyls2002
requested review from
AgainstEntropy,
ByronHsu,
DarkSharpness,
Duyi-Wang,
HydraQYH,
Oasis-Git,
bingxche,
celve,
kevin-mii,
michaelzhang-ai,
niehen6174,
rwang5203,
sogalin and
yichiche
as code owners
November 3, 2026 03:10
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
hnyls2002
force-pushed
the
lsyin/indirect-import-lint
branch
from
November 3, 2026 03:13
c0ed610 to
4d14ef6
Compare
Collaborator
Author
|
/tag-and-rerun-ci |
Open
4 tasks done
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/lint/check_indirect_imports.pyas thecheck-indirect-importspre-commit hook. It rejectsfrom sglang.a import fwhensglang/a.pydoes not definefbut only imports it, and names the module thatsglang.aimportsffrom.__all__, it imports it asf as f, it is a package__init__.py, or it binds the name inside anif/try(the module that picks an implementation per platform or as a fallback). Relative imports are resolved and checked like absolute ones, not rejected.pre-commit run --all-files, which the lint workflow runs.server_argsnow come fromsglang.srt.arg_groups.choices(server_argskeeps its public block for plugins), and two tests takeget_tokenizerfromsglang.benchmark.utils.No behavior change.
CI States
Latest PR Test (Base): 🚫 Run #41572148959
Latest PR Test (Extra): ❌ Run #41572148835
Latest PR Test (AMD ROCm 10): ⏳ Run #41572149095
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: