From 0556e53e0cab9a4154925b99006e23e6a77ca3c4 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sun, 25 Jul 2021 18:32:48 +0200 Subject: [PATCH] Use isort to reorder python imports reorder-python-imports is hard to set up correctly. isort is a lot simpler to set to set up it locally, and is kinda becoming the standard in the python world. The import style remains the same, and is tweaked to minimise conflicts. --- .pre-commit-config.yaml | 7 ++++--- setup.cfg | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4f167b..eb1319b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,8 @@ repos: rev: "21.6b0" hooks: - id: black - - repo: https://github.com/asottile/reorder_python_imports - rev: v2.5.0 + - repo: https://github.com/pycqa/isort + rev: 5.8.0 hooks: - - id: reorder-python-imports + - id: isort + name: isort (python) diff --git a/setup.cfg b/setup.cfg index 1608e93..59f3793 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,3 +21,6 @@ extend-ignore = max-line-length = 88 exclude = .eggs,build import-order-style = smarkets + +[isort] +force_single_line=true