pythonpython-black

Black (Python) Ignore Rule


I feel Black is doing something not compliant (with my Organisation), so I am trying to ignore certain rules.

Example below and a related link

PEP 8: whitespace before ':'

My Organisation (Coding Standards) does not give priority to what Black feels is right, but wants a way to customise black configurations.

I dont see any mentioned of Ignoring a Rule in Black documentation https://github.com/psf/black#command-line-options.

They have given examples to ignore Flake8 rules, but dont seem to have any documentation for their own product.


Solution

  • You can't customize black. From the readme:

    Black reformats entire files in place. It is not configurable.