pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
848 stars 140 forks source link

Format Python code with ruff format instead of black #2824

Closed cclauss closed 4 months ago

cclauss commented 5 months ago

Failing tests are fixed in:

We want all tools run in pre-commit to be as fast as possible to enhance contributor productivity.

Let's consider formatting Python code with a highly compatible yet much faster formatter than Black.

https://docs.astral.sh/ruff/formatter/#philosophy

The formatter is designed as a drop-in replacement for Black, but with an excessive focus on performance and direct integration with Ruff. Given Black's popularity within the Python ecosystem, targeting Black compatibility ensures that formatter adoption is minimally disruptive for the vast majority of projects.

From: Known Deviations from Black

oddbookworm commented 5 months ago

@cclauss I haven't seen you on the pygame community discord server, where a lot of contribution discussions happen. If you'd like to join in those conversations, you can join the server at https://discord.gg/pygame

cclauss commented 5 months ago

a couple of super minor formatting differences

https://docs.astral.sh/ruff/formatter/#black-compatibility

cclauss commented 5 months ago

Please re-run the failing test.

cclauss commented 4 months ago

Do we need more approvals?

damusss commented 4 months ago

@cclauss Don't think so, I think someone just need to press some magical merge button