python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

respect noqa #182

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

fixes #181 Implemented:

remaining TODO:

Zac-HD commented 1 year ago

it would be nice to catch errors-due-to-updated-linters with a bot, instead of me randomly encountering them when writing new PRs and being surprised.

Yeah, I think it's time that we started pinning our dependencies. Steal the pip-tools setup from shed in a new PR? The idea is to pin all the transitive deps, and then have a tox env that updates them - for now we can just run that manually every so often.

Zac-HD commented 1 year ago

don't autofix noqa'd errors

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 šŸ˜

jakkdl commented 1 year ago

don't autofix noqa'd errors

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 stuck_out_tongue_closed_eyes

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.

jakkdl commented 1 year ago

Oh actually, current solution is very incompatible with flake8-noqa as it suppresses errors even when run non-standalone...

jakkdl commented 1 year ago

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.

jakkdl commented 1 year ago

nowait, this also needs to ignore ast visitor errors. but can fix that in another PR

Zac-HD commented 1 year ago

Looks like we've got some useful fixes here for the other PRs, so merging this + #184 now. I'll test locally ~monday (I hope šŸ¤ž), and cut a release either then or after #185 if that turns out to be really necessary. Thanks again!