build: Add type checking
This commit is contained in:
@@ -191,7 +191,7 @@ def configure_cookbook_tools(mcp: FastMCP):
|
||||
recipe_yield: int | None = None,
|
||||
category: str | None = None,
|
||||
keywords: str | None = None,
|
||||
ctx: Context = None,
|
||||
ctx: Context = None, # type: ignore
|
||||
) -> CreateRecipeResponse:
|
||||
"""Create a new recipe.
|
||||
|
||||
@@ -271,7 +271,7 @@ def configure_cookbook_tools(mcp: FastMCP):
|
||||
recipe_yield: int | None = None,
|
||||
category: str | None = None,
|
||||
keywords: str | None = None,
|
||||
ctx: Context = None,
|
||||
ctx: Context = None, # type: ignore
|
||||
) -> UpdateRecipeResponse:
|
||||
"""Update an existing recipe.
|
||||
|
||||
@@ -544,7 +544,7 @@ def configure_cookbook_tools(mcp: FastMCP):
|
||||
folder: str | None = None,
|
||||
update_interval: int | None = None,
|
||||
print_image: bool | None = None,
|
||||
ctx: Context = None,
|
||||
ctx: Context = None, # type: ignore
|
||||
) -> ReindexResponse:
|
||||
"""Set Cookbook app configuration.
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ def configure_notes_tools(mcp: FastMCP):
|
||||
content, mime_type = await client.webdav.get_note_attachment(
|
||||
note_id=note_id, filename=attachment_filename
|
||||
)
|
||||
return {
|
||||
return { # type: ignore
|
||||
"uri": f"nc://Notes/{note_id}/attachments/{attachment_filename}",
|
||||
"mimeType": mime_type,
|
||||
"data": content,
|
||||
|
||||
@@ -163,7 +163,7 @@ async def provision_nextcloud_access(
|
||||
if not user_id:
|
||||
# Get the authorization token from context
|
||||
if hasattr(ctx, "authorization") and ctx.authorization:
|
||||
token = ctx.authorization.token
|
||||
token = ctx.authorization.token # type: ignore
|
||||
# Decode token to get user info
|
||||
try:
|
||||
import jwt
|
||||
@@ -304,7 +304,7 @@ async def revoke_nextcloud_access(
|
||||
# Get user ID from context if not provided
|
||||
if not user_id:
|
||||
user_id = (
|
||||
ctx.context.get("user_id", "default_user")
|
||||
ctx.context.get("user_id", "default_user") # type: ignore
|
||||
if hasattr(ctx, "context")
|
||||
else "default_user"
|
||||
)
|
||||
@@ -334,7 +334,7 @@ async def revoke_nextcloud_access(
|
||||
"OIDC_DISCOVERY_URL",
|
||||
f"{os.getenv('NEXTCLOUD_HOST')}/.well-known/openid-configuration",
|
||||
),
|
||||
nextcloud_host=os.getenv("NEXTCLOUD_HOST"),
|
||||
nextcloud_host=os.getenv("NEXTCLOUD_HOST"), # type: ignore
|
||||
encryption_key=encryption_key,
|
||||
)
|
||||
|
||||
@@ -382,7 +382,7 @@ async def check_provisioning_status(
|
||||
# Get user ID from context if not provided
|
||||
if not user_id:
|
||||
user_id = (
|
||||
ctx.context.get("user_id", "default_user")
|
||||
ctx.context.get("user_id", "default_user") # type: ignore
|
||||
if hasattr(ctx, "context")
|
||||
else "default_user"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user