When working on #1652, it became clear that pyproject-fmt will format the default uv init repo structure.
If we call the function to use pyproject-fmt, we should invoke the tool for its side effects.
We should add an abstract method to Tool called apply. By default, it will be no-op, i.e. just have pass.
But the PyprojectFmtTool should over-ride this to invoke its command via subprocess. We should have an appropriate message via tick print.
We should do the exact same for Ruff format (not the linter auto-fixes).
When working on #1652, it became clear that
pyproject-fmtwill format the defaultuv initrepo structure.If we call the function to use
pyproject-fmt, we should invoke the tool for its side effects.We should add an abstract method to
Toolcalledapply. By default, it will be no-op, i.e. just havepass.But the
PyprojectFmtToolshould over-ride this to invoke its command via subprocess. We should have an appropriate message via tick print.We should do the exact same for Ruff format (not the linter auto-fixes).