build: Add type checking

This commit is contained in:
Chris Coutinho
2025-11-05 15:19:55 +01:00
parent 9dcda0cd6a
commit 6cccd92b3b
17 changed files with 104 additions and 47 deletions
+3 -3
View File
@@ -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.
+1 -1
View File
@@ -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,
+4 -4
View File
@@ -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"
)