Closed jakkdl closed 1 year ago
turns out fixing the errors made the PR simpler, as I had mistaken assumptions about how lineno-parsing was handled in CSTTransformers
.
uh, is it an update to trio or pyright that has it throwing new errors? It now seems to be analyzing trio
properly for some reason and seeing missing objects and whether functions are coroutines.
I don't know why pyright
has changed, but short-term I'd just ignore tests/
and longer term #187.
I don't know why
pyright
has changed, but short-term I'd just ignoretests/
and longer term #187.
added commit which excludes tests/eval_files
and tests/autofix_files
I don't know why
pyright
has changed, but short-term I'd just ignoretests/
and longer term #187.
also related to #160
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