From b113fd2a6af9d7262b515bdda86404f0a8284dd0 Mon Sep 17 00:00:00 2001 From: Yoann Schneider <yschneider@teklia.com> Date: Fri, 12 Apr 2024 18:27:36 +0200 Subject: [PATCH] Use ruff for Isort --- .pre-commit-config.yaml | 4 ---- ruff.toml | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f1da5de97e..51fc70b908 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/pycqa/flake8 rev: 3.9.2 hooks: diff --git a/ruff.toml b/ruff.toml index 622b1a91e3..d14e149d84 100644 --- a/ruff.toml +++ b/ruff.toml @@ -5,8 +5,45 @@ line-length = 120 quote-style = "double" [lint] -select = ["Q0", "F", "W", "E", +select = [ + # flake8-quotes + "Q0", + # pyflakes + "F", + # pycodestyle + "W", + "E", # request-without-timeout "S113", + # isort + "I", ] ignore = ["E501"] + +[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", +] -- GitLab