Closed
Description
Started discussion in PR #162
Pitch: Passing over the formatters twice could help clear out problems where the work of one formatter is undone by another one.
The current implementation is mostly focused in finding that formatters conflict with each other (run again after a full pass)
and having it raise an error.
Current development branch ...
https://github.com/jspaezp/pydocstringformatter/tree/feature/twopass
Current broken tests ...
FAILED tests/test_config.py::TestStyleOption::test_style_in_toml - ValueError: Conflicting formatters: numpydoc-section-spacing, closing-quotes
FAILED tests/test_config.py::TestStyleOption::test_boolopt_in_toml - ValueError: Conflicting formatters: numpydoc-section-spacing, closing-quotes
FAILED tests/test_formatting.py::test_formatting[linewrap_summary-function_docstrings.py] - ValueError: Conflicting formatters: split-summary-body, final-period
FAILED tests/test_formatting.py::test_formatting[linewrap_summary-max_line_length_50.py] - ValueError: Conflicting formatters: split-summary-body, final-period
FAILED tests/test_formatting.py::test_formatting[numpydoc-numpydoc_regression.py] - ValueError: Conflicting formatters: numpydoc-section-spacing, closing-quotes
so .... is it of interest to add this changes? If anything it is a great debugging addition for development
should arguments be added to enable it?
should the error be more user-friendly?
If so and you have insights on those design aspects I will make this a PR