diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9e91dcd29e44b85d1c8c2c597ecfb235ba5e300..651b1e3abc3478dcc1cd129096d127c01ac09d62 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,12 @@ repos: rev: 21.5b0 hooks: - 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 rev: v0.812 hooks: diff --git a/pyproject.toml b/pyproject.toml index 4a2d590fc26312e62023ce8d54b77810a93348df..a81bb69f80b2aea05e58cdf6ab33859764c0cff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,7 @@ pylint = "^2.7.2" pre-commit = "^2.12.1" sphinx = "^3.2.1" sphinx_rtd_theme = "^0.5.0" + +[tool.isort] +profile = "black" +src_paths = ["duniterpy", "tests", "examples"]