DiddiLeija / diddi-and-the-bugs

Diddi and the Bugs, my GameOff 2021 game.
https://diddileija.itch.io/diddi-and-the-bugs
MIT License
7 stars 3 forks source link

Use `ruff format ...` in addition to `ruff check ... --fix` via Nox #216

Open DiddiLeija opened 2 months ago

DiddiLeija commented 2 months ago

Is your feature request related to a problem? Please describe.

Our format Nox session only uses ruff check [files] --fix to "format" our codebase:

https://github.com/DiddiLeija/diddi-and-the-bugs/blob/93e6ca8e36270ec4ff25bee557230438b53b0a92/noxfile.py#L17-L21

However, this is a misunderstanding of the ruff check command, as it only fixes any critical thing, but no formatting happens at all.

Describe the solution you'd like

Adding a session.run call to this function:

https://github.com/DiddiLeija/diddi-and-the-bugs/blob/93e6ca8e36270ec4ff25bee557230438b53b0a92/noxfile.py#L17-L18

to run the ruff format command on our files. It's not necessary to delete the ruff check --fix line, as it could be useful too.

Describe alternatives you've considered

Stick to the check --fix-only formatting, but this is not recommended.

Additional context

This is a Good First Issue, so I'd love to see a new contributor taking on this ticket!

If you need help with coding Nox sessions, you might find this documentation useful :hugs: