Skip to content

Commit

Permalink
pre-commit: Fix RuntimeError in isort hook
Browse files Browse the repository at this point in the history
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: PyCQA/isort#2083 (comment)
Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
  • Loading branch information
honggyukim committed Feb 20, 2023
1 parent a5fc2cd commit 5ba7751
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions gdb/uftrace/mcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 2 additions & 2 deletions gdb/uftrace/plthook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
3 changes: 1 addition & 2 deletions gdb/uftrace/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5ba7751

Please sign in to comment.