Landscape.io offers nice and good Python code tests and based on PEP 8, Pylint, McCabe, etc.
Some of my parser methods contain big switch blocks, so I would like to disable the McCabe test MC0001 for selected methods. How can I do this?
I found this syntax for PyLint:
for file in get_files(): # pylint:disable=redefined-builtin
Source: https://docs.landscape.io/suppressing.html
... but no syntax is shown for mccabe
. Based on my Google research, it's possible to disable a McCabe rule for all files in a project, but this is not my goal. Here is a YAML file globally disabling MC0001:
mccabe:
disable:
- MC0001
Source: https://0x7df.wordpress.com/tag/mccabe/