deivit24 / python-steam-api

MIT License
25 stars 11 forks source link

Add linter and pre-commit configuration #23

Closed mscheltienne closed 3 months ago

mscheltienne commented 3 months ago

PR independent from #22

In this PR, I added the configuration for linter/formatters and for the pre-commit framework. I did not run the linter/formatter which I will do in a separate PR as it will yield a large git diff.

The tools include:

The pre-commit frameworks let you run those linting tools before committing. It is not mandatory, if you want to use it, you need to run:

pip install pre-commit
pre-commit install

This last line must be run from the root of the repository (it adds some stuff in .git). Once this PR is merged, you can also go to https://pre-commit.ci/ and setup this repository (it's very simple and quick). It will add a pre-commit CI which runs the style checks. On PRs, it will also automatically commit changes if some of those style check modified files (the formatters 😉).

mscheltienne commented 3 months ago

@deivit24 FYI, the formatter ruff I used in the other PR was setup with this configuration.