Merge pull request #40681 from barredterra/ruff

chore: switch to ruff for python formatting/linting