the assertion fails with 5 != 4 as the line numbers of objects are never updated once parsed when initiating the plugin.
The best way to fix this would probably, as the header suggest, be to first make a pass where all enabled autofixers are run - with autofixed errors being printed out with old and/or no line markers. Then the file is reparsed, and enabled visitors are run on the file.
low-priority QoL - unless flake8-trio is used in automated environments.
Failing test:
the assertion fails with
5 != 4
as the line numbers of objects are never updated once parsed when initiating the plugin.The best way to fix this would probably, as the header suggest, be to first make a pass where all enabled autofixers are run - with autofixed errors being printed out with old and/or no line markers. Then the file is reparsed, and enabled visitors are run on the file.