From 8df3a5437a388df046ccc5f3fb0ba3593d7cc9f1 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 11 Nov 2022 23:45:04 -0500 Subject: [PATCH] Take indentation into account for import-from wrapping (#693) --- src/isort/plugins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/isort/plugins.rs b/src/isort/plugins.rs index c8ea0b7e88..733390c98a 100644 --- a/src/isort/plugins.rs +++ b/src/isort/plugins.rs @@ -64,7 +64,7 @@ pub fn check_imports( // Generate the sorted import block. let expected = format_imports( body, - &settings.line_length, + &(settings.line_length - indentation.len()), &settings.src, &settings.isort.known_first_party, &settings.isort.known_third_party,