Skip to content

[pyrefly] Deduplicate global missing-import paths - #4385

Open
lyydsheep wants to merge 1 commit into
facebook:mainfrom
lyydsheep:codex/issue-4246-deduplicate-ignore-missing-imports
Open

[pyrefly] Deduplicate global missing-import paths#4385
lyydsheep wants to merge 1 commit into
facebook:mainfrom
lyydsheep:codex/issue-4246-deduplicate-ignore-missing-imports

Conversation

@lyydsheep

Copy link
Copy Markdown
Contributor

Fixes #4246

Summary

  • When migrated mypy configuration enables global missing-import suppression, emit only the * wildcard.
  • Preserve specific module patterns and their order when no global wildcard is present.
  • Cover both global ignore_missing_imports and global follow_imports = skip mixed with specific module settings.
  • The local .scratch planning files are intentionally not included in this PR.

Validation

  • cargo test -p pyrefly_config migration::ignore_missing_imports — 10 passed
  • cargo test -p pyrefly commands::init — 34 passed
  • python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema — passed; one pre-existing Clippy warning in crates/pyrefly_config/src/error_kind.rs
  • cargo fmt --all -- --check and git diff --check — passed

When migrated configuration suppresses missing imports globally, omit narrower module patterns that the global wildcard already covers.
@meta-codesync

meta-codesync Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D114455050. (Because this pull request was imported automatically, there will not be any future comments.)

@lyydsheep
lyydsheep marked this pull request as ready for review August 2, 2026 04:14
@github-actions
github-actions Bot requested a review from maggiemoss August 2, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyrefly init creates ignore-missing-imports paths with overlaps

2 participants