Repository navigation
ci: treat optional backend imports as Any in pyrefly - #5305
Merged
terrykong merged 1 commit intoNov 20, 2026
Merged
Conversation
RNabel
marked this pull request as ready for review
November 19, 2026 10:47
svcnvidia-nemo-ci
left a comment
Contributor
There was a problem hiding this comment.
LGTM. No qualifying findings in the Pyrefly configuration or baseline changes. The 39 removed records correspond to the eight optional-package namespaces, and unrelated diagnostics are kept.
Static review only. I did not run lint or Pyrefly, and CI status was unavailable.
Generated by Codex
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
The lint environment does not install the backend extras or the docs group, so imports of modelopt, sglang, transformer_engine and a few others were reported as missing-import. List them under replace-imports-with-any, as is already done for megatron and vllm, and prune the 39 baseline entries this resolves. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Robin Nabel <[email protected]>
RNabel
force-pushed
the
rnabel/pyrefly-optional-imports
branch
from
November 19, 2026 19:30
fa7f281 to
7a22876
Compare
RNabel
force-pushed
the
rnabel/pyrefly-baseline
branch
from
November 19, 2026 19:30
741a817 to
a48fc3a
Compare
Contributor
Author
|
/ok to test 7a22876 |
terrykong
approved these changes
Nov 19, 2026
4 tasks done
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.
What does this PR do ?
Removes 39
missing-importerrors from the Pyrefly baseline by telling Pyrefly that a few optional packages are not installed in the lint environment.Issues
None. Stacked on #5298.
Usage
Not applicable: type-checker configuration only.
Before your PR is "Ready for review"
Pre checks:
Additional Information
devandbuilddependencies only, so imports from backend extras and the docs group cannot be resolved there:modelopt(21 errors),sglangandsglang_router(9),transformer_engine(5), and one each fornvidia_resiliency_ext,fla,sentence_transformersandmyst_parser.replace-imports-with-anyinpyrefly.toml, the mechanism already used formegatron,vllm,tensorrt_llmand others.pyrefly-baseline.jsonis pruned withpyrefly check --prune-baseline: 1,610 entries become 1,571. Onlymissing-importentries are removed and none are added.Anysurfaced no new errors:pyrefly checkreported 0 before pruning.missing-importremains:examples/run_vlm_sft.pyimports the sibling scriptrun_sft, which is a path question, not an optional dependency.No runtime code changes, so there are no new tests and the unit tests were not re-run for this PR.
🤖 Generated with Claude Code