Skip to content

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

Closed

Description

@jorenham

Describe the Bug

before:

float(object())  # pyrefly:ignore[bad-argument-type,potato]

after pyrefly check --remove-unused-ignores:

float(object())  # pyrefly: ignore [bad-argument-type]

I'm a bit nit-pick-y when it comes to formatting, so I'm manually removing unused pyrefly ignores instead of using --remove-unused-ignores because of this. But I'll admit that this isn't the most pressing of issues ;).

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Activity

  1. samwgoldman commented on May 13, 2026

    @samwgoldman
    Contributor

    Oh, that is annoying! Thanks for the report :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions