mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-01 19:32:26 +02:00
install flake8-black and move pytest config in pyproject.toml
This commit is contained in:
parent
5a5b4ccb25
commit
8275915a55
3 changed files with 11 additions and 4 deletions
|
@ -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 = '''
|
||||||
|
|
|
@ -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 .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
[tool:pytest]
|
|
||||||
DJANGO_SETTINGS_MODULE = la_chariotte.settings
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = migrations
|
exclude = migrations
|
||||||
extend-ignore = E501
|
extend-ignore = E501
|
Loading…
Reference in a new issue