ruff icon indicating copy to clipboard operation
ruff copied to clipboard

[red-knot] Integrate formatter

Open MichaReiser opened this issue 1 year ago • 2 comments

Summary

This is a first hacky approach to integrate the formatter into red-knot.

There are plenty of TODOs. The main questions is where and when we should write the formatted content and how we avoid that formatting requires two-passes for the cache to be "hot".

Test Plan

I ran red knot and it formated my files (all lints gone, whoops)

MichaReiser avatar Apr 30 '24 14:04 MichaReiser

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

github-actions[bot] avatar Apr 30 '24 15:04 github-actions[bot]

I still plan to land this PR eventually but aren't prioritising it right now. Deciding on a query system and exploring persistent caching is of higher importance right now and the prototype itself was enough for me to learn a lot about the challenge when it comes to integrate the formatter.

MichaReiser avatar May 10 '24 06:05 MichaReiser