From 85d2b5055a18be54aa169b58e909855e25c11511 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Thu, 24 Feb 2022 09:54:17 +0200 Subject: [PATCH] 'Refactored by Sourcery' --- src/darker/linewise_black.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/darker/linewise_black.py b/src/darker/linewise_black.py index 10afb3408..9e1956b2b 100644 --- a/src/darker/linewise_black.py +++ b/src/darker/linewise_black.py @@ -22,10 +22,7 @@ def format_str_to_chunks( # pylint: disable=too-many-locals """ src_node = lib2to3_parse(src_contents.lstrip(), mode.target_versions) future_imports = get_future_imports(src_node) - if mode.target_versions: - versions = mode.target_versions - else: - versions = detect_target_versions(src_node) + versions = mode.target_versions or detect_target_versions(src_node) normalize_fmt_off(src_node) lines = LineGenerator( mode=mode,