From e45dde9386ca53e82444d5de9367fc101901c448 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Wed, 10 Jan 2024 10:26:19 +1300 Subject: [PATCH] Customise isort sections Add custom sections for hail and CPG-local imports. Same line length as for other linters, and add a template for listing submodules etc that should not be linted or edited. --- pyproject.toml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 18795cc..200819c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,25 @@ skip-string-normalization = true [tool.isort] py_version = 311 profile = "black" +line_length = 88 +sections = ["FUTURE", "STDLIB", "THIRDPARTY", "HAIL", "CPG", "FIRSTPARTY", "LOCALFOLDER"] +known_hail = [ + "hail", + "hailtop", +] +# Adjust these for each repository, e.g., removing those that should be +# local rather than CPG. Also fill in extend_skip below if there are any +# subdirectories that should be ignored. +known_cpg = [ + "analysis_runner", + "cpg_infra", + "cpg_utils", + "cpg_workflows", + "gnomad", + "hail_scripts", + "metamist", +] +# extend_skip = ["list", "submodules", "etc", here"] [tool.ruff] line-length = 88