xenon icon indicating copy to clipboard operation
xenon copied to clipboard

Turning off check for a specific file or function inline #noqa

Open hayorov opened this issue 6 years ago • 2 comments

It would be nice to have an ability to add noqa inline instead of additional cmd arguments -e, --exclude and -i, --ignore

hayorov avatar May 01 '19 07:05 hayorov

Xenon is just a wrapper around Radon, so this change would need to go there. But it's quite tricky to implement something like this. Complexity is calculated on the AST, so if a comment like that is on some node, should Radon ignore all of its children? It's not that clear.

rubik avatar May 17 '19 17:05 rubik

It depends on ack, but here's a workaround:

ack -t python 'xenon: noqa' -L --print0 | xargs -0 xenon -b B -m A -a A

davetapley avatar Jul 28 '23 22:07 davetapley