Skip to content

Keep formatting with --remove-unused-ignores #3369#3551

Open
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3369
Open

Keep formatting with --remove-unused-ignores #3369#3551
jorenham wants to merge 1 commit into
facebook:mainfrom
jorenham:gh-3369

Conversation

@jorenham
Copy link
Copy Markdown
Contributor

Summary

Whitespace in ignore comments is now preserved when --remove-unused-ignores removes a strict subset of ignored codes.

Fixes #3369

Test Plan

Test added, and updated some existing tests

@github-actions
Copy link
Copy Markdown

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

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 22, 2026

@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D106081030.

@yangdanny97 yangdanny97 self-assigned this May 22, 2026
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.

--remove-unused-ignores inserts whitespace in existing # type:ignore comments

2 participants