style(rmi-backend): complete lint cleanup — 1175→0 ruff errors

- Fix 71 invalid-syntax files (class-body newline-broken assignments)
- Add from/None chain to 307 B904 raise-without-from sites
- Add B008 ignore to ruff.toml (already in pyproject.toml)
- Noqa F401 on __init__.py re-exports (137 sites)
- Noqa E402 on deferred imports (63 sites)
- Bulk-add stdlib/FastAPI/project imports for F821 (127 sites)
- Replace ×→x, –→-, …→... in docstrings (4093 chars)
- Manual refactor of 5 SIM103/SIM116 patterns

Tests: 791 passed (66 deselected due to pre-existing Redis issues in test_rag.py)
Co-authored-by: opencode <opencode@rugmunch.io>
This commit is contained in:
opencode 2026-07-06 15:43:20 +02:00
parent ca9bdce365
commit c762564d40
688 changed files with 5165 additions and 5142 deletions

View file

@ -33,7 +33,7 @@ except ImportError:
LANGCHAIN_AVAILABLE = False
try:
from rmi_sdk import RMI, ToolResult
from rmi_sdk import RMI, ToolResult # noqa: F401
SDK_AVAILABLE = True
except ImportError:
@ -145,7 +145,7 @@ if LANGCHAIN_AVAILABLE and SDK_AVAILABLE:
run_manager: CallbackManagerForToolRun | None = None,
**kwargs: Any,
) -> str:
# Use sync version for now async SDK available separately
# Use sync version for now - async SDK available separately
return self._run(run_manager=run_manager, **kwargs)
class RMIScanTool(RMITool):
@ -170,7 +170,7 @@ if LANGCHAIN_AVAILABLE and SDK_AVAILABLE:
class RMIHoneypotTool(RMITool):
name: str = "rmi_honeypot"
description: str = "Check if a token is a honeypot tokens you can buy but cannot sell. Returns honeypot status and risk factors."
description: str = "Check if a token is a honeypot - tokens you can buy but cannot sell. Returns honeypot status and risk factors."
args_schema: type[BaseModel] = HoneypotInput
class RMISentimentTool(RMITool):
@ -197,18 +197,18 @@ if LANGCHAIN_AVAILABLE and SDK_AVAILABLE:
class RMIMarketOverviewTool(RMITool):
name: str = "rmi_market_overview"
description: str = "Get current market overview prices, volumes, trends across major chains and tokens."
description: str = "Get current market overview - prices, volumes, trends across major chains and tokens."
args_schema: type[BaseModel] = MarketOverviewInput
class RMINarrativeTool(RMITool):
name: str = "rmi_narrative"
description: str = "Get current market narrative what is the market saying RIGHT NOW? Returns trending narratives, sentiment, and community focus."
description: str = "Get current market narrative - what is the market saying RIGHT NOW? Returns trending narratives, sentiment, and community focus."
args_schema: type[BaseModel] = NarrativeInput
class RMIForensicsTool(RMITool):
name: str = "rmi_forensics"
description: str = (
"Run deep wallet forensics transaction history, fund flows, connected addresses, and risk analysis."
"Run deep wallet forensics - transaction history, fund flows, connected addresses, and risk analysis."
)
args_schema: type[BaseModel] = ForensicsInput