From 1c7812fa9f73df72855be8e3c64f9d30dbfc67b1 Mon Sep 17 00:00:00 2001 From: claude Date: Fri, 5 Jun 2026 20:24:52 +0000 Subject: [PATCH] fix: remove unused _yaml_scalar and redundant isinstance guard Co-Authored-By: Claude Sonnet 4.6 --- bot_bottle/backend/docker/egress_apply.py | 2 -- bot_bottle/egress.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/bot_bottle/backend/docker/egress_apply.py b/bot_bottle/backend/docker/egress_apply.py index b1440e3..87b6d42 100644 --- a/bot_bottle/backend/docker/egress_apply.py +++ b/bot_bottle/backend/docker/egress_apply.py @@ -183,8 +183,6 @@ def _merge_single_route( new_paths.append(val) existing_paths.add(val) if new_paths: - if not isinstance(existing_matches, list): - existing_matches = [] existing_matches.append( {"paths": [{"value": p} for p in new_paths]} ) diff --git a/bot_bottle/egress.py b/bot_bottle/egress.py index de65208..a9a582f 100644 --- a/bot_bottle/egress.py +++ b/bot_bottle/egress.py @@ -186,14 +186,6 @@ def _route_to_yaml_fields(r: Route) -> dict[str, object]: return fields -def _yaml_scalar(v: object) -> str: - if isinstance(v, bool): - return "true" if v else "false" - if isinstance(v, str): - return f'"{v}"' - return str(v) - - def egress_render_routes( routes: tuple[EgressRoute, ...], ) -> str: