-
Large projects such as Pandas are switching their linting (partially) to the fast I opened a PR to do so in HA core too (home-assistant/core#86224) but I was told I jumped the gun and discussion should be had first. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Please list out the advantages and disadvantages comparing the solutions when making a proposal for a change. In this specific case, there (for example) are differences in rules supported. What would get lost in this? What would be gained? While I could suggest to make a shadow run of ruff next to what we already have, it seem to go again the goal you mentioned in the linked PR
So, I guess that isn't an option. |
Beta Was this translation helpful? Give feedback.
-
Glad you asked, @frenck! Pros
Cons
Differences in rules supportedI wrote a little script to compare the current (core @ 200d3ae845) linting rules to what Ruff supports or doesn't; please find the full analysis results over at https://gist.github.com/akx/6cd6a9e659164aecd46bdede24045592#file-home-assistant-ruff-flake8-support-md, but the main takeaways of what is not supported by ruff is below, with my comments.
|
Beta Was this translation helpful? Give feedback.
-
So, some approaches: Approach 1:
Approach 2:
The difference is that 2 is a little more aggressive and quicker, but will show up quicker in dev that something is wrong. Approach 2 will allow us to deploy extra rules (provided in ruff) today, if we want. Approach 1 is a more careful route / hold-back route. I think either of these is acceptable. |
Beta Was this translation helpful? Give feedback.
So, some approaches:
Approach 1:
Approach 2: