diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5375c94d7..0ce4be95c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,4 +39,10 @@ repos: - id: actionlint-docker args: ["-ignore", "SC2102"] +- repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort (python) + # TODO we can make pylint run at this stage too, once their execution gets normalized diff --git a/pyproject.toml b/pyproject.toml index 3c11d398c..cc4cef492 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,6 +246,7 @@ formatting = [ # Version specified following Black stability policy: # https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy "black[jupyter]~=23.0", + "isort~=5.12" ] all = [ @@ -450,3 +451,5 @@ max-statements = 105 # Default is 50 omit = [ "haystack/testing/*", ] +[tool.isort] +profile = "black"