Update ruff
Cherry-picked from !4919 (merged):
- Added a manual version of ruff auto-fixing all problems. Run it with:
pre-commit run --hook-stage manual
- allow "confusable" en-dash
- updated ruff version (reason: better handling of semicolons in Jupyter notebook code cells)