don't autofix noqa'd errors, add --disable-noqa, add non-passing test for noqa reliability #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
big refactor for noqa functionality fixing most of the remaining ones in #185, but as I added the test for all errors being properly noqa'd and was greeted with a wall of errors I realized it might be good to commit and push before tackling them. If it's a minor fix I'll just push/amend it to this PR, otherwise open a separate one.
Moves# noqa
logic intoFlake8TrioVisitor_cst
, other than for ast visitors where some logic still is in__init__.py
utility visitorNoqaHandler
removed--disable-noqa
, and use that instead of whether we're standalone to decide whether to parse noqa or not.the list ofautofixing does not mess up line numbers in fact.noqas
is no longer parsed once by a utility visitor, but instead parsed by each visitor. This is a performance hit (though probably not very large, if any) but is sorta necessary as autofixing messes up line numbers.should_autofix
now takes aCSTNode
parameter so it can determine the line number of it, and check if it's noqa'dvisitor91x handles all casesvisitor91x
now doesn't autofix simplenoqa
scenarios, but doesn't handle loops and the like