python-trio / flake8-async

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

TRIO91X not disabled by default? #141

Closed richardsheridan closed 1 year ago

richardsheridan commented 1 year ago

I recently bumped flake8-trio on a whim and it is throwing TRIO910 into my CI:

https://github.com/richardsheridan/trio-parallel/actions/runs/4212170131/jobs/7311010067#step:6:15

These sections had been silenced before by # noqa: TRIO107. Ironically, I actually want the check enabled and explicitly silenced but this strikes me as a bug?

Some context:

[flake8]
no-checkpoint-warning-decorators = pytest.fixture, asynccontextmanager
jakkdl commented 1 year ago

Ah, when you specify --ignore that will override the default-disabling of 910 (and any other codes disabled by default by flake8 or other plugins). If you use --extend-ignore instead then 910 will be disabled.

And yeah the code was renamed recently, so 107 is 910 and 108 is 911.

richardsheridan commented 1 year ago

Thanks for the tip! This fixes the issue. I copied that ignore line years ago from the trio source without taking time to understand the detailed semantics of it...