Skip to content

Commit c5bbd45

Browse files
committed
lint
1 parent 9dbdcdf commit c5bbd45

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

examples/mcp-web-search-and-fetch.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
try:
2424
# Preferred high-level API (if available)
2525
from mcp.server.fastmcp import FastMCP # type: ignore
26+
2627
_FASTMCP_AVAILABLE = True
2728
except Exception:
2829
_FASTMCP_AVAILABLE = False
@@ -33,7 +34,6 @@
3334
from mcp.server.stdio import stdio_server # type: ignore
3435

3536

36-
3737
client = Client()
3838

3939

@@ -48,7 +48,7 @@ def _web_fetch_impl(url: str) -> Dict[str, Any]:
4848

4949

5050
if _FASTMCP_AVAILABLE:
51-
app = FastMCP("ollama-search-fetch")
51+
app = FastMCP('ollama-search-fetch')
5252

5353
@app.tool()
5454
def web_search(query: str, max_results: int = 3) -> Dict[str, Any]:
@@ -79,11 +79,11 @@ def web_fetch(url: str) -> Dict[str, Any]:
7979

8080
return _web_fetch_impl(url=url)
8181

82-
if __name__ == "__main__":
82+
if __name__ == '__main__':
8383
app.run()
8484

8585
else:
86-
server = Server("ollama-search-fetch") # type: ignore[name-defined]
86+
server = Server('ollama-search-fetch') # type: ignore[name-defined]
8787

8888
@server.tool() # type: ignore[attr-defined]
8989
async def web_search(query: str, max_results: int = 3) -> Dict[str, Any]:
@@ -112,6 +112,5 @@ async def _main() -> None:
112112
async with stdio_server() as (read, write): # type: ignore[name-defined]
113113
await server.run(read, write) # type: ignore[attr-defined]
114114

115-
if __name__ == "__main__":
115+
if __name__ == '__main__':
116116
asyncio.run(_main())
117-

0 commit comments

Comments
 (0)