Skip to content
Snippets Groups Projects
Commit 6adea371 authored by Moul's avatar Moul
Browse files

[enh] #162: Introduce isort pre-commit hook

Use black profile:
https://github.com/PyCQA/isort/issues/1518#issuecomment-703056188
https://pycqa.github.io/isort/docs/configuration/config_files/
https://pycqa.github.io/isort/docs/configuration/profiles/

Add pylint configuration in pyproject.toml

Exclude 'docs' folder check when running:
pre-commit run isort -a
parent cb571987
No related branches found
No related tags found
2 merge requests!157v1.0.0rc0: merge dev into master,!136#135, #162: Introduce mypy, pylint, isort, gitlab-ci pre-commit hooks
...@@ -3,6 +3,12 @@ repos: ...@@ -3,6 +3,12 @@ repos:
rev: 21.5b0 rev: 21.5b0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
hooks:
- id: isort
args: ["--profile", "black"]
exclude: ^docs/
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812 rev: v0.812
hooks: hooks:
......
...@@ -42,3 +42,7 @@ pylint = "^2.7.2" ...@@ -42,3 +42,7 @@ pylint = "^2.7.2"
pre-commit = "^2.12.1" pre-commit = "^2.12.1"
sphinx = "^3.2.1" sphinx = "^3.2.1"
sphinx_rtd_theme = "^0.5.0" sphinx_rtd_theme = "^0.5.0"
[tool.isort]
profile = "black"
src_paths = ["duniterpy", "tests", "examples"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment