From 09550a7b2eeaf7de723c10bbffe4c941a2d860db Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:44:25 +0200 Subject: [PATCH] Apply ruff/Perflint rule PERF402 https://docs.astral.sh/ruff/rules/manual-list-copy/ --- tabulate/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tabulate/__init__.py b/tabulate/__init__.py index 11bb865..9e76a52 100644 --- a/tabulate/__init__.py +++ b/tabulate/__init__.py @@ -1108,8 +1108,7 @@ def _flat_list(nested_list): ret = [] for item in nested_list: if isinstance(item, list): - for subitem in item: - ret.append(subitem) + ret.extend(item) else: ret.append(item) return ret