fix: remove unused _yaml_scalar and redundant isinstance guard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -183,8 +183,6 @@ def _merge_single_route(
|
|||||||
new_paths.append(val)
|
new_paths.append(val)
|
||||||
existing_paths.add(val)
|
existing_paths.add(val)
|
||||||
if new_paths:
|
if new_paths:
|
||||||
if not isinstance(existing_matches, list):
|
|
||||||
existing_matches = []
|
|
||||||
existing_matches.append(
|
existing_matches.append(
|
||||||
{"paths": [{"value": p} for p in new_paths]}
|
{"paths": [{"value": p} for p in new_paths]}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -186,14 +186,6 @@ def _route_to_yaml_fields(r: Route) -> dict[str, object]:
|
|||||||
return fields
|
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(
|
def egress_render_routes(
|
||||||
routes: tuple[EgressRoute, ...],
|
routes: tuple[EgressRoute, ...],
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user