chore: bump ruff (#1085)

This commit is contained in:
Marcelo Trylesinski 2025-07-04 10:01:17 +02:00 • committed by GitHub
commit 9301924f44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 56 additions and 57 deletions

View file

@ -35,7 +35,7 @@ def get_uv_path() -> str:
uv_path = shutil.which("uv")
if not uv_path:
logger.error(
"uv executable not found in PATH, falling back to 'uv'. " "Please ensure uv is installed and in your PATH"
"uv executable not found in PATH, falling back to 'uv'. Please ensure uv is installed and in your PATH"
)
return "uv" # Fall back to just "uv" if not found
return uv_path

View file

@ -150,10 +150,10 @@ def _import_server(file: Path, server_object: str | None = None):
True if it's supported.
"""
if not isinstance(server_object, FastMCP):
logger.error(f"The server object {object_name} is of type " f"{type(server_object)} (expecting {FastMCP}).")
logger.error(f"The server object {object_name} is of type {type(server_object)} (expecting {FastMCP}).")
if isinstance(server_object, LowLevelServer):
logger.warning(
"Note that only FastMCP server is supported. Low level " "Server class is not yet supported."
"Note that only FastMCP server is supported. Low level Server class is not yet supported."
)
return False
return True
@ -164,7 +164,7 @@ def _import_server(file: Path, server_object: str | None = None):
for name in ["mcp", "server", "app"]:
if hasattr(module, name):
if not _check_server_object(getattr(module, name), f"{file}:{name}"):
logger.error(f"Ignoring object '{file}:{name}' as it's not a valid " "server object")
logger.error(f"Ignoring object '{file}:{name}' as it's not a valid server object")
continue
return getattr(module, name)
@ -269,7 +269,7 @@ def dev(
npx_cmd = _get_npx_command()
if not npx_cmd:
logger.error(
"npx not found. Please ensure Node.js and npm are properly installed " "and added to your system PATH."
"npx not found. Please ensure Node.js and npm are properly installed and added to your system PATH."
)
sys.exit(1)
@ -371,7 +371,7 @@ def install(
typer.Option(
"--name",
"-n",
help="Custom name for the server (defaults to server's name attribute or" " file name)",
help="Custom name for the server (defaults to server's name attribute or file name)",
),
] = None,
with_editable: Annotated[
@ -445,7 +445,7 @@ def install(
name = server.name
except (ImportError, ModuleNotFoundError) as e:
logger.debug(
"Could not import server (likely missing dependencies), using file" " name",
"Could not import server (likely missing dependencies), using file name",
extra={"error": str(e)},
)
name = file.stem