mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-08 21:02:12 +02:00
chore(mcp): remove unused imports in trustgraph-mcp
Closes #784. ruff F401 pass on `trustgraph-mcp/trustgraph/mcp_server/`: - `tg_socket.py` — drop `dataclasses.dataclass` and `time` (the example called out in the issue; neither is referenced anywhere in the file). - `mcp.py` — drop five additional unused imports surfaced by ruff in the same directory: `typing.Optional`, `time`, `typing.AsyncGenerator`, `asyncio`, `uuid`, `mcp.types.TextContent`, and `websockets.asyncio.client.connect`. Scope is limited to the mcp_server directory — seven F401 hits, all autofixable. Other packages in the monorepo have more F401 warnings that can be cleaned up in follow-up PRs to keep this one reviewable. `ruff check --select F401 trustgraph-mcp/trustgraph/mcp_server/` is clean after the change.
This commit is contained in:
parent
ec8f740de3
commit
563ec51b03
2 changed files with 1 additions and 9 deletions
|
|
@ -1,20 +1,14 @@
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from typing import Optional
|
|
||||||
import os
|
import os
|
||||||
import time
|
from typing import Any, Dict, List
|
||||||
from typing import AsyncGenerator, Any, Dict, List
|
|
||||||
import asyncio
|
|
||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
import uuid
|
|
||||||
import argparse
|
import argparse
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from collections.abc import AsyncIterator
|
from collections.abc import AsyncIterator
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from mcp.server.fastmcp import FastMCP, Context
|
from mcp.server.fastmcp import FastMCP, Context
|
||||||
from mcp.types import TextContent
|
|
||||||
from websockets.asyncio.client import connect
|
|
||||||
|
|
||||||
from trustgraph.base.logging import add_logging_args, setup_logging
|
from trustgraph.base.logging import add_logging_args, setup_logging
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
|
|
||||||
from dataclasses import dataclass
|
|
||||||
from websockets.asyncio.client import connect
|
from websockets.asyncio.client import connect
|
||||||
from urllib.parse import urlencode, urlparse, urlunparse, parse_qs
|
from urllib.parse import urlencode, urlparse, urlunparse, parse_qs
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
import time
|
|
||||||
|
|
||||||
class WebSocketManager:
|
class WebSocketManager:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue