Replace flake8 and isort with ruff (#3810)

- Introduce ruff (https://beta.ruff.rs/) to replace flake8 and isort
- Update mypy and black
This commit is contained in:
Alexander Bayandin
2023-03-14 14:25:44 +01:00
committed by GitHub
parent 68ae020b37
commit 3d869cbcde
39 changed files with 177 additions and 249 deletions

View File

@@ -129,13 +129,12 @@ Run `poetry shell` to activate the virtual environment.
Alternatively, use `poetry run` to run a single command in the venv, e.g. `poetry run pytest`.
### Obligatory checks
We force code formatting via `black`, `isort` and type hints via `mypy`.
We force code formatting via `black`, `ruff`, and type hints via `mypy`.
Run the following commands in the repository's root (next to `pyproject.toml`):
```bash
poetry run isort . # Imports are reformatted
poetry run black . # All code is reformatted
poetry run flake8 . # Python linter
poetry run ruff . # Python linter
poetry run mypy . # Ensure there are no typing errors
```