Change linter, ruff to black

pull/213/head
Davy Peter Braun 9 months ago
parent 28b0583919
commit 130c0ac95f

@ -1,10 +1,9 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/psf/black
rev: "v0.2.2" rev: 24.3.0 # Use the latest revision of Black
hooks: hooks:
- id: ruff - id: black
args: ["--fix"] language_version: python3
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v4.5.0
hooks: hooks:

@ -55,7 +55,7 @@ Then run `poetry install` again. If this doesn't work, please join our [Discord
## Code Formatting and Linting ## Code Formatting and Linting
Our project uses `ruff` for code formatting and `isort` for import sorting. To ensure consistency across contributions, please adhere to the following guidelines: Our project uses `black` for code formatting and `isort` for import sorting. To ensure consistency across contributions, please adhere to the following guidelines:
1. **Install Pre-commit Hooks**: 1. **Install Pre-commit Hooks**:
@ -63,7 +63,7 @@ Our project uses `ruff` for code formatting and `isort` for import sorting. To e
```bash ```bash
cd software # Change into `software` directory if not there already. cd software # Change into `software` directory if not there already.
poetry shell # /!\ You MUST do it the virtual environment of your project poetry shell # It's better to do it within the virtual environment of your project
poetry add --dev pre-commit # Install pre-commit as a dev dependency poetry add --dev pre-commit # Install pre-commit as a dev dependency
pre-commit install pre-commit install
``` ```
@ -75,7 +75,7 @@ Our project uses `ruff` for code formatting and `isort` for import sorting. To e
If you choose not to use the pre-commit hooks, you can manually format your code using: If you choose not to use the pre-commit hooks, you can manually format your code using:
```bash ```bash
ruff . black .
isort . isort .
``` ```

Loading…
Cancel
Save