Skip to content

Commit 130c0ac

Browse files
committed
Change linter, ruff to black
1 parent 28b0583 commit 130c0ac

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.pre-commit-config.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
repos:
2-
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.2.2"
2+
- repo: https://github.com/psf/black
3+
rev: 24.3.0 # Use the latest revision of Black
44
hooks:
5-
- id: ruff
6-
args: ["--fix"]
7-
- id: ruff-format
5+
- id: black
6+
language_version: python3
87
- repo: https://github.com/pre-commit/pre-commit-hooks
98
rev: v4.5.0
109
hooks:

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ Then run `poetry install` again. If this doesn't work, please join our [Discord
5555

5656
## Code Formatting and Linting
5757

58-
Our project uses `ruff` for code formatting and `isort` for import sorting. To ensure consistency across contributions, please adhere to the following guidelines:
58+
Our project uses `black` for code formatting and `isort` for import sorting. To ensure consistency across contributions, please adhere to the following guidelines:
5959

6060
1. **Install Pre-commit Hooks**:
6161

6262
To automatically format your code every time you make a commit, install the pre-commit hooks.
6363

6464
```bash
6565
cd software # Change into `software` directory if not there already.
66-
poetry shell # /!\ You MUST do it the virtual environment of your project
66+
poetry shell # It's better to do it within the virtual environment of your project
6767
poetry add --dev pre-commit # Install pre-commit as a dev dependency
6868
pre-commit install
6969
```
@@ -75,7 +75,7 @@ Our project uses `ruff` for code formatting and `isort` for import sorting. To e
7575
If you choose not to use the pre-commit hooks, you can manually format your code using:
7676

7777
```bash
78-
ruff .
78+
black .
7979
isort .
8080
```
8181

0 commit comments

Comments
 (0)