From bffd5043dc739e98cd946fa9179fa903946965c1 Mon Sep 17 00:00:00 2001 From: claude Date: Thu, 25 Jun 2026 07:27:31 +0000 Subject: [PATCH] refactor: drop redundant single-parent fast path in _resolve_one_bottle _fold_parents with one name returns after the first resolve; the single-element branch was a verbatim copy of the general path. --- bot_bottle/manifest_extends.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/bot_bottle/manifest_extends.py b/bot_bottle/manifest_extends.py index bdf55c9..ef7ccc4 100644 --- a/bot_bottle/manifest_extends.py +++ b/bot_bottle/manifest_extends.py @@ -81,18 +81,6 @@ def _resolve_one_bottle( f"defined. Available bottles: {avail}" ) - if len(parent_names) == 1: - parent_name = parent_names[0] - parent = _resolve_one_bottle( - parent_name, raws, cache, repos_cache, seen + (name,) - ) - merged_repos_raw = _resolve_repos_raw(repos_cache[parent_name], child_raw) - bottle = _merge_bottles(parent, child_raw, merged_repos_raw, name) - cache[name] = bottle - repos_cache[name] = merged_repos_raw - return bottle - - # Multiple parents: fold left-to-right into a combined parent. combined_parent, combined_repos_raw = _fold_parents( parent_names, raws, cache, repos_cache, seen + (name,) )