Documenting all error codes with examples
GlenNicholls opened this issue · comments
I am using tryceratops 1.1.0 as a flake8 plugin. Anyways, I am getting quite a few errors, some of which are self-explanatory and some of which aren't. Is it possible to add a section to the docs explaining each error along with examples (i.e. recommended/pass patterns for failure conditions)?
For example, this one is throwing me off TC003 Avoid specifying long messages outside the exception class
and I'm not sure exactly what the issue is. Other than that, though, I don't have anywhere to go to get more information to fix the error.
def fn(pattern):
if not isinstance(pattern, str):
raise TypeError("pattern must be a string, blah, blah, blah")
The docs with examples on each violation live inside the docs
dir. For example, the one you mentioned, it's available here: https://github.com/guilatrova/tryceratops/blob/main/docs/violations/TC003.md
Do you have any ideas on how can we make it more obvious/easy to find for new people?
Gotcha, thanks. I didn't see the link in https://github.com/guilatrova/tryceratops#violations while scrolling through the docs, my bad.