install flake8-black and move pytest config in pyproject.toml

This commit is contained in:
Laetitia Getti 2023-03-30 16:08:54 +02:00
parent 5a5b4ccb25
commit 8275915a55
3 changed files with 11 additions and 4 deletions

View file

@ -5,6 +5,9 @@ description = "Web application for organising grouped orders"
readme = "readMe.md" readme = "readMe.md"
license = {file = "LICENSE"} license = {file = "LICENSE"}
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "la_chariotte.settings"
[tool.black] [tool.black]
line-length = 88 line-length = 88
exclude = ''' exclude = '''

View file

@ -10,8 +10,15 @@ Lancer les tests avec pytest :
pytest pytest
``` ```
Formater les fichiers avec black : Vérifier le formatage des fichers avec flake8 :
```bash
flake8
```
Si l'erreur `BLK100 Blakck would make changes.` apparait, c'est utile de lancer black pour formater les fichiers :
```bash ```bash
black . black .
``` ```

View file

@ -1,6 +1,3 @@
[tool:pytest]
DJANGO_SETTINGS_MODULE = la_chariotte.settings
[flake8] [flake8]
exclude = migrations exclude = migrations
extend-ignore = E501 extend-ignore = E501