Skip to content

Commit 69d6b8c

Browse files
aschleanclaude
andcommitted
style[core]: format resource template code with ruff
Minor formatting improvements to resource template implementation: - Fix line spacing and indentation - Break long comment line for better readability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7771be3 commit 69d6b8c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/golf/core/builder.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,17 +498,17 @@ def _get_transport_config(self, transport_type: str) -> dict:
498498

499499
def _is_resource_template(self, component: ParsedComponent) -> bool:
500500
"""Check if a resource component is a template (has URI parameters).
501-
501+
502502
Args:
503503
component: The parsed component to check
504-
504+
505505
Returns:
506506
True if the resource has URI parameters, False otherwise
507507
"""
508508
return (
509-
component.type == ComponentType.RESOURCE and
510-
component.parameters is not None and
511-
len(component.parameters) > 0
509+
component.type == ComponentType.RESOURCE
510+
and component.parameters is not None
511+
and len(component.parameters) > 0
512512
)
513513

514514
def _generate_server(self) -> None:
@@ -528,7 +528,7 @@ def _generate_server(self) -> None:
528528
# Create imports section
529529
imports = [
530530
"from fastmcp import FastMCP",
531-
"from fastmcp.tools import Tool",
531+
"from fastmcp.tools import Tool",
532532
"from fastmcp.resources import Resource, ResourceTemplate",
533533
"from fastmcp.prompts import Prompt",
534534
"import os",
@@ -769,7 +769,9 @@ def _generate_server(self) -> None:
769769

770770
elif component_type == ComponentType.RESOURCE:
771771
if self._is_resource_template(component):
772-
registration = f"# Register the resource template '{component.name}' from {full_module_path}"
772+
registration = (
773+
f"# Register the resource template '{component.name}' from {full_module_path}"
774+
)
773775

774776
# Use the entry_function if available, otherwise try the
775777
# export variable

0 commit comments

Comments
 (0)