style: fix ruff quote style violations (Q000)
- Change single quotes to double quotes in logging formatters - Fixes: setup_mcp.py, verify_mcp.py formatter strings - Addresses Q000 linter errors from PR review
This commit is contained in:
+1
-2
@@ -12,7 +12,6 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Configure logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -20,7 +19,7 @@ def setup_logger():
|
||||
"""Configure logger for CLI usage with colored output."""
|
||||
if not logger.handlers:
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
formatter = logging.Formatter('%(message)s')
|
||||
formatter = logging.Formatter("%(message)s")
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
+2
-3
@@ -11,7 +11,6 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Configure logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -19,7 +18,7 @@ def setup_logger():
|
||||
"""Configure logger for CLI usage."""
|
||||
if not logger.handlers:
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
formatter = logging.Formatter('%(message)s')
|
||||
formatter = logging.Formatter("%(message)s")
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO)
|
||||
@@ -35,7 +34,7 @@ class Colors:
|
||||
|
||||
def check(description: str) -> bool:
|
||||
"""Print check description and return a context manager for result."""
|
||||
logger.info(f"Checking {description}... ", extra={'end': ''})
|
||||
logger.info(f"Checking {description}... ", extra={"end": ""})
|
||||
sys.stdout.flush()
|
||||
return True
|
||||
|
||||
|
||||
+8
-9
@@ -30,7 +30,6 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Configure logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -40,33 +39,33 @@ def setup_logger():
|
||||
# For STDIO mode, log to stderr; for HTTP mode, log to stdout
|
||||
stream = sys.stderr if "--stdio" in sys.argv else sys.stdout
|
||||
handler = logging.StreamHandler(stream)
|
||||
formatter = logging.Formatter('[MCP] %(message)s')
|
||||
formatter = logging.Formatter("[MCP] %(message)s")
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
|
||||
# Initialize logger
|
||||
setup_logger()
|
||||
|
||||
# Suppress FastMCP banner in STDIO mode
|
||||
if "--stdio" in sys.argv:
|
||||
# Monkey-patch rich Console to redirect to stderr
|
||||
import rich.console
|
||||
|
||||
_original_console_init = rich.console.Console.__init__
|
||||
|
||||
def _patched_console_init(self, *args, **kwargs):
|
||||
kwargs['file'] = sys.stderr # Force all rich output to stderr
|
||||
kwargs["file"] = sys.stderr # Force all rich output to stderr
|
||||
_original_console_init(self, *args, **kwargs)
|
||||
|
||||
rich.console.Console.__init__ = _patched_console_init
|
||||
|
||||
from fastmcp import FastMCP
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import PlainTextResponse
|
||||
from fastmcp import FastMCP # noqa: E402
|
||||
from starlette.requests import Request # noqa: E402
|
||||
from starlette.responses import PlainTextResponse # noqa: E402
|
||||
|
||||
from aden_tools.credentials import CredentialManager, CredentialError
|
||||
from aden_tools.tools import register_all_tools
|
||||
from aden_tools.credentials import CredentialError, CredentialManager # noqa: E402
|
||||
from aden_tools.tools import register_all_tools # noqa: E402
|
||||
|
||||
# Create credential manager
|
||||
credentials = CredentialManager()
|
||||
|
||||
Reference in New Issue
Block a user