Browse Source

feat(lint): ajoute la conf de isort

tags/v094^2
François Poulain François Poulain 9 months ago
parent
commit
1e404bb11f
3 changed files with 27 additions and 0 deletions
  1. +15
    -0
      pyproject.toml
  2. +2
    -0
      requirements/development.txt
  3. +10
    -0
      setup.cfg

+ 15
- 0
pyproject.toml View File

@@ -0,0 +1,15 @@
[tool.black]
line-length = 79
skip-string-normalization = true
exclude = '''
/(
\.git
| assets
| local
| migrations
| node_modules
| var
| venv
)/
| urls(|_.+|/.+).py
'''

+ 2
- 0
requirements/development.txt View File

@@ -7,7 +7,9 @@ pytest-sugar # https://github.com/Frozenball/pytest-sugar

# Code quality
# ------------------------------------------------------------------------------
black; python_version>'3.5' # https://github.com/python/black
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
- 0
setup.cfg View File

@@ -33,3 +33,13 @@ exclude =
docs,
node_modules
max-line-length = 80

[isort]
line_length = 80
known_first_party = terre_de_liens
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