From 52abcff995d1fa5fe84d01e250189f0d2e87f514 Mon Sep 17 00:00:00 2001 From: Honggyu Kim Date: Mon, 20 Feb 2023 16:50:24 +0900 Subject: [PATCH] pre-commit: Fix RuntimeError in isort hook The pre-commit shows an error in isort hook as follows. RuntimeError: The Poetry configuration is invalid This can be fixed by upgrading isort rev to 5.11.5 so this patch changes the version to fix it. In addition, apply changes from isort 5.11.5 to make pre-commit happy. Link: https://github.com/PyCQA/isort/issues/2083#issuecomment-1408300628 Signed-off-by: Honggyu Kim --- .pre-commit-config.yaml | 2 +- gdb/uftrace/mcount.py | 5 +---- gdb/uftrace/plthook.py | 4 ++-- gdb/uftrace/trigger.py | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 831e97749..f1f1f28cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.11.5 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-clang-format diff --git a/gdb/uftrace/mcount.py b/gdb/uftrace/mcount.py index 5c38037a2..7a9316aac 100644 --- a/gdb/uftrace/mcount.py +++ b/gdb/uftrace/mcount.py @@ -12,10 +12,7 @@ # import gdb -from uftrace import utils -from uftrace import rbtree -from uftrace import trigger - +from uftrace import rbtree, trigger, utils filter_type = utils.CachedType("struct uftrace_filter") diff --git a/gdb/uftrace/plthook.py b/gdb/uftrace/plthook.py index 47129bed7..f80bb7d75 100644 --- a/gdb/uftrace/plthook.py +++ b/gdb/uftrace/plthook.py @@ -14,10 +14,10 @@ # This work is licensed under the terms of the GNU GPL version 2. # -import gdb import os -from uftrace import utils, lists +import gdb +from uftrace import lists, utils plthook_data_type = utils.CachedType("struct plthook_data") diff --git a/gdb/uftrace/trigger.py b/gdb/uftrace/trigger.py index 95c678fba..768eb4c66 100644 --- a/gdb/uftrace/trigger.py +++ b/gdb/uftrace/trigger.py @@ -12,8 +12,7 @@ # import gdb -from uftrace import utils -from uftrace import lists +from uftrace import lists, utils filter_type = utils.CachedType("struct uftrace_filter") trigger_type = utils.CachedType("struct uftrace_trigger")