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
This commit is contained in:
Neovasky
2025-07-28 11:52:10 -04:00
parent 3ddeeab67f
commit 83748a27da
3 changed files with 14 additions and 11 deletions
+6 -3
View File
@@ -125,10 +125,14 @@ class CalendarClient(BaseNextcloudClient):
except HTTPStatusError as e:
if e.response.status_code == 401:
logger.warning("Authentication failed for CalDAV - Calendar app may not be enabled for this user")
logger.warning(
"Authentication failed for CalDAV - Calendar app may not be enabled for this user"
)
return []
elif e.response.status_code == 404:
logger.warning("CalDAV endpoint not found - Calendar app may not be installed")
logger.warning(
"CalDAV endpoint not found - Calendar app may not be installed"
)
return []
logger.error(f"HTTP error listing calendars: {e}")
raise e
@@ -435,7 +439,6 @@ class CalendarClient(BaseNextcloudClient):
# Add alarms/reminders
reminder_minutes = event_data.get("reminder_minutes", 0)
if reminder_minutes > 0:
alarm = Alarm()
alarm.add("action", "DISPLAY")
alarm.add("description", "Event reminder")
+6 -6
View File
@@ -372,7 +372,7 @@ async def nc_calendar_create_event(
color: str = "",
):
"""Create a comprehensive calendar event with full feature support
Args:
calendar_name: Name of the calendar to create the event in
title: Event title
@@ -394,7 +394,7 @@ async def nc_calendar_create_event(
attendees: Comma-separated email addresses
url: Related URL for the event
color: Event color (hex or name)
Returns:
Dict with event creation result
"""
@@ -609,16 +609,16 @@ async def nc_calendar_create_meeting(
reminder_minutes: int = 15,
):
"""Quick meeting creation with smart defaults
This is a convenience function for creating events with common meeting defaults.
It automatically:
- Calculates end time based on duration
- Sets status to CONFIRMED
- Adds a reminder
- Uses simpler date/time inputs instead of full ISO format
For full control over all event properties, use nc_calendar_create_event instead.
Args:
title: Meeting title
date: Meeting date (YYYY-MM-DD format, e.g., "2025-01-15")
@@ -630,7 +630,7 @@ async def nc_calendar_create_meeting(
location: Meeting location
description: Meeting description/agenda
reminder_minutes: Minutes before meeting to send reminder (default: 15)
Returns:
Dict with meeting creation result
"""
@@ -95,10 +95,10 @@ async def test_list_calendars(nc_client: NextcloudClient):
calendars = await nc_client.calendar.list_calendars()
assert isinstance(calendars, list)
if not calendars:
pytest.skip("No calendars available - Calendar app may not be enabled")
logger.info(f"Found {len(calendars)} calendars")
# Check structure of calendars