-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
respect noqa #182
respect noqa #182
Conversation
Yeah, I think it's time that we started pinning our dependencies. Steal the |
For simplicity I think we can skip this too for now; if it's autofixable I think we're OK with doing that and if I turn out to be wrong, well, that's a future problem 😝 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
tests/test_flake8_trio.py
Outdated
# pytest prints parametrized values, but not the key, so to make the summary info | ||
# readable we make the parameters strings and here turn them into bools | ||
autofix = autofix_str == "autofix" | ||
anyio = library == "anyio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also the ids=
argument which can customize this, passing either a list of strings or an arg->str function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh, much better!
well, if you have any TRIO91x errors noqa'd they'll be autofixed - although I suppose extra lowlevel checkpoints won't do anything. noqa'd TRIO100 being autofixed is quite a bit worse, but maybe not too common. But I can postpone it to a separate PR regardless. |
Oh actually, current solution is very incompatible with flake8-noqa as it suppresses errors even when run non-standalone... |
But feel free to merge and test against live code, and if it works up to you how badly you want to break flake8-noqa, or wait until followup PRs. |
nowait, this also needs to ignore ast visitor errors. but can fix that in another PR |
fixes #181
Implemented:
noqa
test_eval
so summaries are more informative than e.g.test_eval[False, True, TRIO100, path7]
remaining TODO:
noqa
'd errorsnoqa
d when they raise/autofix it.noqa-trio
(or similar / depends on discussion in Support# noqa
comments when calling directly #181)noqa-trio
SimpleStatementSuite
NOAUTOFIX
--disable-noqa