Configure Ruff as the code formatter and linter with pre-commit hooks.
Applied automatic formatting fixes across the entire codebase including:
- Import sorting and organization
- Code style consistency (spacing, line breaks, indentation)
- String quote normalization
- Removal of trailing whitespace and unnecessary blank lines