Skip to content

Commit dc6eb07

Browse files
committed
Apply ruff formatting fixes
1 parent 385da2e commit dc6eb07

File tree

5 files changed

+28
-41
lines changed

5 files changed

+28
-41
lines changed

src/mcpm/commands/inspect.py

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,10 @@ def launch_raw_inspector():
5454
[cyan]mcpm inspect time[/] # Inspect time server
5555
5656
[bold yellow]Continue with raw inspector?[/]"""
57-
58-
panel = Panel(
59-
panel_content,
60-
title="🔍 MCP Inspector",
61-
border_style="yellow",
62-
padding=(1, 2)
63-
)
57+
58+
panel = Panel(panel_content, title="🔍 MCP Inspector", border_style="yellow", padding=(1, 2))
6459
console.print(panel)
65-
60+
6661
# Prompt for confirmation
6762
try:
6863
confirm = click.confirm("Launch raw MCP Inspector", default=True)
@@ -72,28 +67,28 @@ def launch_raw_inspector():
7267
except (KeyboardInterrupt, EOFError):
7368
console.print("\n[yellow]Cancelled.[/]")
7469
sys.exit(0)
75-
70+
7671
# Launch raw inspector
7772
raw_inspector_cmd = f"{NPX_CMD} @modelcontextprotocol/inspector"
78-
73+
7974
console.print("\n[bold]Launching raw MCP Inspector...[/]")
8075
console.print("The Inspector UI will open in your web browser.")
8176
console.print("[yellow]Press Ctrl+C to stop the Inspector.[/]")
82-
77+
8378
try:
8479
console.print(f"[dim]Executing: {raw_inspector_cmd}[/]")
8580
cmd_parts = shlex.split(raw_inspector_cmd)
8681
returncode = subprocess.call(cmd_parts)
87-
82+
8883
if returncode == 0:
8984
console.print("[bold green]Inspector process completed successfully.[/]")
9085
elif returncode in (130, -2):
9186
console.print("[bold yellow]Inspector process was terminated.[/]")
9287
else:
9388
console.print(f"[bold red]Inspector process exited with code {returncode}[/]")
94-
89+
9590
sys.exit(returncode)
96-
91+
9792
except KeyboardInterrupt:
9893
console.print("\n[bold yellow]Inspector process terminated by keyboard interrupt.[/]")
9994
sys.exit(130)
@@ -112,14 +107,14 @@ def launch_raw_inspector():
112107
def inspect(server_name):
113108
"""Launch MCP Inspector to test and debug a server from global configuration.
114109
115-
If SERVER_NAME is provided, finds the specified server in the global configuration
110+
If SERVER_NAME is provided, finds the specified server in the global configuration
116111
and launches the MCP Inspector with the correct configuration to connect to and test the server.
117-
112+
118113
If no SERVER_NAME is provided, launches the raw MCP Inspector for manual configuration.
119114
120115
Examples:
121116
mcpm inspect # Launch raw inspector (manual setup)
122-
mcpm inspect mcp-server-browse # Inspect the browse server
117+
mcpm inspect mcp-server-browse # Inspect the browse server
123118
mcpm inspect filesystem # Inspect filesystem server
124119
mcpm inspect time # Inspect the time server
125120
"""

src/mcpm/commands/profile/run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ async def run_profile_fastmcp(profile_servers, profile_name, http_mode=False, po
7575

7676
# Display profile information in a nice panel
7777
http_url = f"http://127.0.0.1:{actual_port}/mcp/"
78-
78+
7979
# Build server list
8080
server_list = "\n".join([f" • [cyan]{server.name}[/]" for server in profile_servers])
81-
81+
8282
panel_content = f"[bold]Profile:[/] {profile_name}\n[bold]URL:[/] [cyan]{http_url}[/cyan]\n\n[bold]Servers:[/]\n{server_list}\n\n[dim]Press Ctrl+C to stop the profile[/]"
83-
83+
8484
panel = Panel(
8585
panel_content,
8686
title="📁 Profile Running Locally",
8787
title_align="left",
8888
border_style="green",
89-
padding=(1, 2)
89+
padding=(1, 2),
9090
)
9191
console.print(panel)
9292

src/mcpm/commands/profile/share.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,26 @@ async def share_profile_fastmcp(profile_servers, profile_name, port, address, ht
121121
if public_url:
122122
# Display critical information in a nice panel
123123
http_url = f"{public_url}/mcp/"
124-
124+
125125
# Build server list
126126
server_list = "\n".join([f" • [cyan]{server.name}[/]" for server in profile_servers])
127-
127+
128128
# Build panel content based on auth status
129129
panel_content = f"[bold]Profile:[/] {profile_name}\n[bold]URL:[/] [cyan]{http_url}[/cyan]\n"
130-
130+
131131
if not no_auth and api_key:
132132
panel_content += f"[bold]HEADER Authorization:[/] [cyan]Bearer {api_key}[/cyan]\n"
133133
else:
134134
panel_content += "[bold red]⚠️ Warning:[/] Anyone with the URL can access your servers\n"
135-
135+
136136
panel_content += f"\n[bold]Shared servers:[/]\n{server_list}\n\n[dim]Press Ctrl+C to stop sharing[/]"
137-
137+
138138
panel = Panel(
139139
panel_content,
140140
title="📁 Profile Shared Publicly",
141141
title_align="left",
142142
border_style="blue",
143-
padding=(1, 2)
143+
padding=(1, 2),
144144
)
145145
console.print(panel)
146146

src/mcpm/commands/run.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ async def run_server_with_fastmcp(server_config, server_name, http_mode=False, p
120120
http_url = f"http://127.0.0.1:{actual_port}/mcp/"
121121
panel_content = f"[bold]Server:[/] {server_name}\n[bold]URL:[/] [cyan]{http_url}[/cyan]\n\n[dim]Press Ctrl+C to stop the server[/]"
122122
panel = Panel(
123-
panel_content,
124-
title="🌐 Local Server Running",
125-
title_align="left",
126-
border_style="green",
127-
padding=(1, 2)
123+
panel_content, title="🌐 Local Server Running", title_align="left", border_style="green", padding=(1, 2)
128124
)
129125
console.print(panel)
130126

src/mcpm/commands/share.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,23 +233,19 @@ async def _share_async(server_config, server_name, port, remote_host, remote_por
233233

234234
# Display critical information in a nice panel
235235
http_url = f"{share_url}/mcp/"
236-
236+
237237
# Build panel content based on auth status
238238
panel_content = f"[bold]Server:[/] {server_name}\n[bold]URL:[/] [cyan]{http_url}[/cyan]\n"
239-
239+
240240
if not no_auth and api_key:
241241
panel_content += f"[bold]HEADER Authorization:[/] [cyan]Bearer {api_key}[/cyan]\n"
242242
else:
243243
panel_content += "[bold red]⚠️ Warning:[/] Anyone with the URL can access your server\n"
244-
244+
245245
panel_content += "\n[dim]Press Ctrl+C to stop sharing[/]"
246-
246+
247247
panel = Panel(
248-
panel_content,
249-
title="🌍 Server Shared Publicly",
250-
title_align="left",
251-
border_style="blue",
252-
padding=(1, 2)
248+
panel_content, title="🌍 Server Shared Publicly", title_align="left", border_style="blue", padding=(1, 2)
253249
)
254250
console.print(panel)
255251

0 commit comments

Comments
 (0)