diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c5876fdbe..77d292b2e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,12 @@ repos: - id: pyupgrade args: [--py38-plus] + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + args: [--resolve-all-configs] + - repo: https://github.com/psf/black rev: 23.1.0 hooks: diff --git a/analyzer/pyproject.toml b/analyzer/pyproject.toml index b1e19ba1a..a3caf65ee 100644 --- a/analyzer/pyproject.toml +++ b/analyzer/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_analyzer"] [tool.pylint.messages_control] extension-pkg-whitelist = "pydantic" diff --git a/api-client/pyproject.toml b/api-client/pyproject.toml index 1cb6facee..1576a28a6 100644 --- a/api-client/pyproject.toml +++ b/api-client/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_api_client"] [tool.pylint.messages_control] extension-pkg-whitelist = "pydantic" diff --git a/api/pyproject.toml b/api/pyproject.toml index a320991ec..ffa3d9c0e 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_api"] [tool.pylint.master] load-plugins = "pylint_django" diff --git a/playout/pyproject.toml b/playout/pyproject.toml index f6658c509..45ad1540a 100644 --- a/playout/pyproject.toml +++ b/playout/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_playout"] [tool.pylint.messages_control] extension-pkg-whitelist = [ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..51a5352d5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.isort] +profile = "black" +combine_as_imports = true diff --git a/shared/pyproject.toml b/shared/pyproject.toml index f8e51df5b..242e7ef39 100644 --- a/shared/pyproject.toml +++ b/shared/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_shared"] [tool.pylint.messages_control] extension-pkg-whitelist = "pydantic" diff --git a/worker/pyproject.toml b/worker/pyproject.toml index 89fecd302..7e72db944 100644 --- a/worker/pyproject.toml +++ b/worker/pyproject.toml @@ -1,6 +1,7 @@ [tool.isort] profile = "black" combine_as_imports = true +known_first_party = ["libretime_worker"] [tool.pylint.messages_control] extension-pkg-whitelist = "pydantic"