From 5c0dbd0dc186f4eb4ca99522bbd11c80a74d168d Mon Sep 17 00:00:00 2001
From: Simon Bjurek <simbj106@student.liu.se>
Date: Tue, 8 Apr 2025 14:15:48 +0200
Subject: [PATCH] Replace isort hook with isort ruff rule

---
 .pre-commit-config.yaml          | 7 +------
 b_asic/gui_utils/about_window.py | 2 +-
 pyproject.toml                   | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3fc8f67f..5a8f0158 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,12 +23,6 @@ repos:
     hooks:
       - id: black
 
-  - repo: https://github.com/pycqa/isort
-    rev: 6.0.0
-    hooks:
-      - id: isort
-        name: isort (python)
-
   - repo: https://github.com/Carreau/velin
     rev: 0.0.11
     hooks:
@@ -39,6 +33,7 @@ repos:
     rev: "v0.9.7"
     hooks:
       - id: ruff
+        args: ["--fix", "--select", "I"]
 
   - repo: https://github.com/adamchainz/blacken-docs
     rev: 1.19.1
diff --git a/b_asic/gui_utils/about_window.py b/b_asic/gui_utils/about_window.py
index 91a7522d..a2bc98f7 100644
--- a/b_asic/gui_utils/about_window.py
+++ b/b_asic/gui_utils/about_window.py
@@ -3,8 +3,8 @@ import sys  # ONLY FOR DEBUG
 
 from qtpy.QtCore import Qt
 from qtpy.QtGui import QCursor, QPixmap
-from qtpy.QtWidgets import QApplication  # ONLY FOR DEBUG
 from qtpy.QtWidgets import (
+    QApplication,  # ONLY FOR DEBUG
     QDialog,
     QFrame,
     QHBoxLayout,
diff --git a/pyproject.toml b/pyproject.toml
index f2d09feb..df271a8b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -101,7 +101,7 @@ precision = 2
 exclude = ["examples", "test", "docs_sphinx"]
 
 [tool.ruff.lint]
-select = ["E4", "E7", "E9", "F", "SIM", "B", "NPY", "C4", "UP", "RUF", "A"]
+select = ["E4", "E7", "E9", "F", "SIM", "B", "NPY", "C4", "UP", "RUF", "A", "I"]
 ignore = ["F403", "B008", "B021", "B006", "UP038", "RUF023", "A005"]
 
 [tool.typos]
-- 
GitLab