CI/STYLE: Add auto-fix to ruff
- [x] closes #51814 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

It seems that `ruff`'s `fix` are duplicates of some of our existing autofix. Maybe we need to make some choices between existing methods and `ruff`? > It seems that ruff's fix are duplicates of some of our existing autofix. Maybe we need to make some choices between existing methods and ruff?

I don't undertstand what you mean, sorry, could you clarify please?

You'll also need to add `exit-non-zero-on-fix` (check the ruff docs for the exact name, it's something like that) > I don't undertstand what you mean, sorry, could you clarify please?
> 
> You'll also need to add `exit-non-zero-on-fix` (check the ruff docs for the exact name, it's something like that)

I have noticed that some of the rules that `ruff` automatically fixes may be duplicates of the rules we have already added to the main branch. However, this is just an intuitive observation, and I have not confirmed it further.
(It is very likely that my intuition was wrong because I did not specifically compare what both would fix automatically)

And `--exit-non-zero-on-fix` has added.