Skip to content

Commit 83748a2

Browse files
committed
fix: apply ruff formatting to pass CI checks
- Fixed line length issues in logger.warning calls - Removed trailing spaces in docstrings - Applied consistent formatting across all files
1 parent 3ddeeab commit 83748a2

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

nextcloud_mcp_server/client/calendar.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@ async def list_calendars(self) -> List[Dict[str, Any]]:
125125

126126
except HTTPStatusError as e:
127127
if e.response.status_code == 401:
128-
logger.warning("Authentication failed for CalDAV - Calendar app may not be enabled for this user")
128+
logger.warning(
129+
"Authentication failed for CalDAV - Calendar app may not be enabled for this user"
130+
)
129131
return []
130132
elif e.response.status_code == 404:
131-
logger.warning("CalDAV endpoint not found - Calendar app may not be installed")
133+
logger.warning(
134+
"CalDAV endpoint not found - Calendar app may not be installed"
135+
)
132136
return []
133137
logger.error(f"HTTP error listing calendars: {e}")
134138
raise e
@@ -435,7 +439,6 @@ def _create_ical_event(self, event_data: Dict[str, Any], event_uid: str) -> str:
435439
# Add alarms/reminders
436440
reminder_minutes = event_data.get("reminder_minutes", 0)
437441
if reminder_minutes > 0:
438-
439442
alarm = Alarm()
440443
alarm.add("action", "DISPLAY")
441444
alarm.add("description", "Event reminder")

nextcloud_mcp_server/server.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ async def nc_calendar_create_event(
372372
color: str = "",
373373
):
374374
"""Create a comprehensive calendar event with full feature support
375-
375+
376376
Args:
377377
calendar_name: Name of the calendar to create the event in
378378
title: Event title
@@ -394,7 +394,7 @@ async def nc_calendar_create_event(
394394
attendees: Comma-separated email addresses
395395
url: Related URL for the event
396396
color: Event color (hex or name)
397-
397+
398398
Returns:
399399
Dict with event creation result
400400
"""
@@ -609,16 +609,16 @@ async def nc_calendar_create_meeting(
609609
reminder_minutes: int = 15,
610610
):
611611
"""Quick meeting creation with smart defaults
612-
612+
613613
This is a convenience function for creating events with common meeting defaults.
614614
It automatically:
615615
- Calculates end time based on duration
616616
- Sets status to CONFIRMED
617617
- Adds a reminder
618618
- Uses simpler date/time inputs instead of full ISO format
619-
619+
620620
For full control over all event properties, use nc_calendar_create_event instead.
621-
621+
622622
Args:
623623
title: Meeting title
624624
date: Meeting date (YYYY-MM-DD format, e.g., "2025-01-15")
@@ -630,7 +630,7 @@ async def nc_calendar_create_meeting(
630630
location: Meeting location
631631
description: Meeting description/agenda
632632
reminder_minutes: Minutes before meeting to send reminder (default: 15)
633-
633+
634634
Returns:
635635
Dict with meeting creation result
636636
"""

tests/integration/test_calendar_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ async def test_list_calendars(nc_client: NextcloudClient):
9595
calendars = await nc_client.calendar.list_calendars()
9696

9797
assert isinstance(calendars, list)
98-
98+
9999
if not calendars:
100100
pytest.skip("No calendars available - Calendar app may not be enabled")
101-
101+
102102
logger.info(f"Found {len(calendars)} calendars")
103103

104104
# Check structure of calendars

0 commit comments

Comments
 (0)