Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pysen/ext/isort_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(
if len(targets) == 0:
return 0

cmd = ["isort", "--settings-path", str(setting_path)]
cmd = ["isort", "--settings-path", str(setting_path), "--src", str(base_dir)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isort==4 does not seem to support --src option. We may need to check isort's version in the same manner to --recursive option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_dir may not what you want. it is not the source directory.

if version.major == 4:
cmd.append("--recursive")
if not inplace_edit:
Expand Down