fix: address PR #632 review comments

- Update stale httpx reference to niquests in calendar.py type comment
- Replace inline inspect.isawaitable with _maybe_await helper in tests
- Fix incorrect port number in docker-compose unstructured comment
- Remove commented-out smithery service block (dead code)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-03-17 17:03:46 +01:00
parent d9b010ab26
commit 945b01cbf5
3 changed files with 6 additions and 29 deletions
+1 -21
View File
@@ -67,7 +67,7 @@ services:
ports:
- 127.0.0.1:8005:8000
# Unstructured API runs on port 8000 internally
# We expose it on 8002 externally to avoid conflict
# We expose it on 8005 externally to avoid conflict
profiles:
- unstructured
@@ -324,26 +324,6 @@ services:
profiles:
- login-flow
# Smithery stateless deployment mode (ADR-016)
# Test with: docker compose --profile smithery up smithery
# Then: curl http://localhost:8081/.well-known/mcp-config
#smithery:
#build:
#context: .
#dockerfile: Dockerfile.smithery
#restart: always
#depends_on:
#app:
#condition: service_healthy
#ports:
#- 127.0.0.1:8081:8081
#environment:
#- SMITHERY_DEPLOYMENT=true
#- ENABLE_SEMANTIC_SEARCH=false
#- PORT=8081
#profiles:
#- smithery
qdrant:
image: docker.io/qdrant/qdrant:v1.17.0@sha256:f1c7272cdac52b38c1a0e89313922d940ba50afd90d593a1605dbbc214e66ffb
restart: always
+1 -1
View File
@@ -51,7 +51,7 @@ class CalendarClient:
url=f"{base_url}/remote.php/dav/",
username=username,
auth=auth,
ssl_verify_cert=get_nextcloud_ssl_verify(), # type: ignore[arg-type] # caldav types say bool|str but passes through to httpx which accepts SSLContext
ssl_verify_cert=get_nextcloud_ssl_verify(), # type: ignore[arg-type] # caldav types say bool|str but passes through to niquests which accepts SSLContext
)
self._calendar_home_url = f"{base_url}/remote.php/dav/calendars/{username}/"
@@ -4,13 +4,14 @@ This test module demonstrates data loss issues when non-supported fields
are present in calendar events and contacts during round-trip operations.
"""
import inspect
import logging
import uuid
from datetime import datetime, timedelta
import pytest
from nextcloud_mcp_server.client.calendar import _maybe_await
logger = logging.getLogger(__name__)
@@ -36,9 +37,7 @@ async def test_calendar_event_custom_fields_preservation(nc_client):
# Get the calendar object from the caldav library
calendar = nc_client.calendar._get_calendar(calendar_name)
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
result = event.load()
if inspect.isawaitable(result):
await result
await _maybe_await(event.load())
# Now manually inject custom iCal properties into the raw data
# This simulates what would happen if the event was created by another CalDAV client
@@ -310,9 +309,7 @@ async def test_calendar_event_roundtrip_data_loss_demonstration(nc_client):
# Get the calendar object and event
calendar = nc_client.calendar._get_calendar(calendar_name)
event = await nc_client.calendar._async_object_by_uid(calendar, event_uid)
result = event.load()
if inspect.isawaitable(result):
await result
await _maybe_await(event.load())
# Inject additional iCal properties that are valid but not supported by our parser
extended_ical = f"""BEGIN:VCALENDAR