python-trio / flake8-async

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

Lint plugin code for visit_ functions that don't call generic_visit or visit #73

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Might very well be redundant once the code is restructured, but otherwise this might make a lot of sense. Might plausibly also be something for flake8_bugbear or other linter plugins based on ast. (or straight up added as an [optional] check to flake8_bugbear maybe)

Realized I'd forgotten it in current PR I'm writing, and checking #69 it had been completely forgotten there too. There's some cases where it doesn't matter (node types that can't have child nodes) - but that's certainly not the case with AsyncFunctionDef as per TRIO114

Zac-HD commented 1 year ago

I think this makes sense as a check for flake8-bugbear, so open an issue there? - it's clearly kinda special-interest, but since flake8 plugin developers are interested it arguably fits! I'd use it on flake8-trio, but I don't think it should be implemented in this repo.