Skip to content

Softens unused import diagnostic to "may be unused" instead of "is un…#4056

Open
kz357 wants to merge 1 commit into
facebook:mainfrom
kz357:fix/issue-3949-soften-unused-import
Open

Softens unused import diagnostic to "may be unused" instead of "is un…#4056
kz357 wants to merge 1 commit into
facebook:mainfrom
kz357:fix/issue-3949-soften-unused-import

Conversation

@kz357

@kz357 kz357 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Softens unused-import diagnostic from "is unused" to "may be unused", per #3949 comments

Added documentation to website/docs/IDE-features.mdx under [Diagnostics]

Fixes #3949

Test Plan

Changed unused-import tests in pyrefly/lib/test/lsp/diagnostic.rs and pyrefly/lib/test/lsp/lsp_interaction/diagnostic.rs to check for "may be unused"

@github-actions

This comment has been minimized.

@yangdanny97 yangdanny97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you update the docs as well? after that this should be good to merge

…used", per facebook#3949

Fixes facebook#3949

Documentation for IDE-only unused-import hint added to IDE-features.mdx
Avoided error-kinds.mdx because it's only an IDE hint
@kz357 kz357 force-pushed the fix/issue-3949-soften-unused-import branch from e8862d9 to fbefb5d Compare July 6, 2026 21:22
@github-actions github-actions Bot added size/xs and removed size/xs labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

Imports that enrich a namespace are flagged despite the new namespace functions begin called

3 participants