Browse Source

style(isort): installe et configure isort

pull/25/head
Jérôme Lebleu 3 years ago
committed by Jérôme Lebleu
parent
commit
c8613d75b3
  1. 6
      Makefile
  2. 1
      requirements/development.txt
  3. 10
      setup.cfg

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

1
requirements/development.txt

@ -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

@ -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

Loading…
Cancel
Save
Map all the world