style(isort): installe et configure isort
Parent
a984a73b30
révision
c8613d75b3
6
Makefile
6
Makefile
|
@ -146,4 +146,8 @@ serve: ### démarre un serveur local pour l'application
|
|||
$(PYTHON) manage.py runserver
|
||||
|
||||
lint: ### vérifie la syntaxe et le code python
|
||||
$(FLAKE8) ess62_plateforme
|
||||
$(FLAKE8) ess62_plateforme ; true
|
||||
$(PYTHON) -m isort --check --recursive ess62_plateforme ; true
|
||||
|
||||
isort: ### vérifie et corrige le trie des imports
|
||||
$(PYTHON) -m isort --recursive ess62_plateforme
|
||||
|
|
|
@ -8,6 +8,7 @@ pytest-sugar # https://github.com/Frozenball/pytest-sugar
|
|||
# Code quality
|
||||
# ------------------------------------------------------------------------------
|
||||
flake8 >=3.5.0 # https://github.com/pycqa/flake8
|
||||
isort # https://github.com/timothycrosley/isort
|
||||
pytest-cov # https://github.com/pytest-dev/pytest-cov
|
||||
|
||||
# Django
|
||||
|
|
10
setup.cfg
10
setup.cfg
|
@ -28,3 +28,13 @@ exclude =
|
|||
dist,
|
||||
node_modules
|
||||
max-line-length = 80
|
||||
|
||||
[isort]
|
||||
line_length = 80
|
||||
known_first_party = ess62_plateforme
|
||||
multi_line_output = 3
|
||||
default_section = THIRDPARTY
|
||||
known_django = django
|
||||
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||
skip_glob = **/migrations/*.py
|
||||
include_trailing_comma = True
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket