python-trio / flake8-async

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

move error codes into visitor classes #82

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

also changes test_113 and 114_options to use ARGS (since they broke from this it was a good opportunity to rewrite them).

As a follow-up, it'd be nice for each visitor class to have a docstring briefly explaining what they do - just copying the relevant line from the readme would be plenty.

Yeah this has been sorely needed for a while, I started copy-pasting but started feeling very silly about it so the visitor classes now define their error codes themselves. Would be fun to move the documentation from the readme into them and auto-generate docs (+ the same for command line args) as well, but that's probs overkill - although having to keep documentation correct in several different files & places is always a pain.