docformatter
docformatter copied to clipboard
Method to ignore portions of docstring [Community Feedback]
It would be useful to have a feature to tell docformatter to leave part of the docstring alone. For example, someone may have manually set up part of the docstring exactly as they want it and don't want it to be touched.
This issue follows from and continues the discussion here.
The proposal in that comment suggests adding # docfmt: off
and # docfmt: on
to the docstring. Assuming the same part of every docstring needs to be ignored, the problem is that it requires changing every docstring to add those comment directives which is not practical for a large project and there is the possibility that the directives will confuse other tools that parse the docstring. I think there needs to be a way to globally set whether docformatter ignores part of each docstring without needing to modify every docstring in a project.