diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab231dc03cddc2deb0d0e501a4db8d1cae34f417..dab142c89c067df7af00866d4ab34b0ceb12d5ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,4 @@ repos: - - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.10.1 - hooks: - - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.3.7 diff --git a/ruff.toml b/ruff.toml index 34f67e876beb4b0c67e642193fc1fec5bc3f1b24..6def6e28921fcec79c3c996c8e4ad680dcaf05b8 100644 --- a/ruff.toml +++ b/ruff.toml @@ -15,6 +15,8 @@ select = [ "E", # request-without-timeout "S113", + # isort + "I", # flake8-debugger "T10", # escape-sequence-in-docstring @@ -23,3 +25,31 @@ select = [ "RET", ] ignore = ["E501", "RET502", "RET503"] + +[lint.isort] +default-section = "first-party" +known-third-party = [ + "SolrClient", + "bleach", + "boto3", + "botocore", + "cryptography", + "corsheaders", + "django", + "django_admin_hstore_widget", + "django_rq", + "drf_spectacular", + "enumfields", + "gitlab", + "psycopg2", + "requests", + "responses", + "rest_framework", + "rq", + "setuptools", + "sqlparse", + "teklia_toolbox", + "tenacity", + "tripoli", + "yaml", +]