Skip to content

--remove-unused-ignores reports the wrong number of removed ignores #1309

@rchen152

Description

@rchen152

Describe the Bug

Test file (named test1.py):

"""Test."""
1 + 1  # pyrefly: ignore

Expected behavior: pyrefly should report that it removed 1 unused ignore
Actual behavior:

$ pyrefly check test1.py --remove-unused-ignores
 INFO 0 errors
 INFO Removed 2 unused error suppression(s) in 1 file(s)

(Pyrefly does correctly remove the 1 ignore, but it claims to have removed 2.)

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

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