stripe / stripe-python

Python library for the Stripe API.
https://stripe.com
MIT License
1.64k stars 418 forks source link

Switch from `black` to `ruff` for formatting #1329

Closed xavdid-stripe closed 3 months ago

xavdid-stripe commented 3 months ago

Per discussion, I've swapped from black to ruff for formatting. It's must faster when running make codegen-format:

Before:

558 files reformatted, 104 files left unchanged.
  fmt: OK (13.54=setup[0.05]+cmd[13.48] seconds)
  congratulations :) (13.61 seconds)

after:

474 files reformatted, 188 files left unchanged
  fmt: OK (0.40=setup[0.04]+cmd[0.35] seconds)
  congratulations :) (0.44 seconds)

I separated the PR into 3 main commits:

So broadly, a reviewer will mostly want to look at the changes from the first commit. Past that, there are superficial formatting changes, but nothing serious.