0

Title pretty much says it, but just to be sure:

I'm not looking for a way of turning off the mccabe check for all callables (functions, methods), just for specific callables I've decided have a good reason to be complex (like a merge sort).

Thanks!

dstromberg
  • 6,954
  • 1
  • 26
  • 27

1 Answers1

-1

Append # noqa to the def-line of your function.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94
  • That works. Does it turn off just the McCabe check, or does it turn off more than that? – dstromberg Jan 29 '17 at 17:51
  • @dstromberg The [documentation](https://github.com/klen/pylama#skip-lines-noqa) is quite terse, but I assume that all tests are skipped for that line. So it is better to fix all other warnings first, and only then add `#noqa`. – Roland Smith Jan 29 '17 at 18:15