CLN: Fix code formatting to address pre-commit and build failures
Run ruff --fix and ruff format to fix style issues flagged by pre-commit.
This resolves common RUF003 errors (e.g., ambiguous hyphens) seen across multiple PRs.
I think as per the documentation I should rename my commit to CLN: Code cleanup. Not sure where you saw pre-commit flagging issues, but the CI is green for main, I think all is good (based on our validations).

Maybe you run things locally with different versions of the validation tools? > Not sure where you saw pre-commit flagging issues, but the CI is green for main, I think all is good (based on our validations).
> 
> Maybe you run things locally with different versions of the validation tools?

Yeah makes sense — but even on a clean main, pre-commit fails for me unless I run Ruff. Even adding just a comment triggers it, so I don’t think it’s a version mismatch. Might be that pre-commit is catching things CI isn’t?

Also seeing the docstring validation failing — happy to fix it if needed, or we can just drop the PR if it’s not worth changing right now. Let me know what you prefer!

 We do check pre-commit in the CI, with main and a clean install of the pre-commit tools if I'm not wrong. And it's green for main, so it seems like you've got something different than our CI locally.

I'll run pre-commit to this PR to see how it looks like. pre-commit.ci autofix Ahh got it — makes sense now. I’ll revert those changes to the test docstrings. Thanks for pointing that out! The problem was that after making the code change, I was manually running ruff format and ruff check --fix, which applied to the entire directory. After running pre-commit, I realized that everything outside the pandas/ directory is skipped, along with pandas/tests/, when using pre-commit run --all-files.