Skip to content

Commit b2ed861

Browse files
committed
style: ruff
1 parent f672490 commit b2ed861

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

caldav/aio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"""
2828

2929
# Import the async client (this is truly async)
30-
from caldav.async_davclient import AsyncDAVClient, AsyncDAVResponse
31-
from caldav.async_davclient import get_calendar, get_calendars
30+
from caldav.async_davclient import AsyncDAVClient, AsyncDAVResponse, get_calendar, get_calendars
3231
from caldav.async_davclient import get_davclient as get_async_davclient
3332
from caldav.calendarobjectresource import CalendarObjectResource, Event, FreeBusy, Journal, Todo
3433
from caldav.collection import (

caldav/calendarobjectresource.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,9 @@ def get_self():
10401040
existing = get_self()
10411041
self._validate_save_constraints(existing, uid, no_overwrite, no_create)
10421042

1043-
if (only_this_recurrence or all_recurrences) and "RECURRENCE-ID" in self.icalendar_component:
1043+
if (
1044+
only_this_recurrence or all_recurrences
1045+
) and "RECURRENCE-ID" in self.icalendar_component:
10441046
from caldav.lib import error
10451047

10461048
obj = get_self()
@@ -1161,7 +1163,9 @@ async def get_self():
11611163
existing = await get_self()
11621164
self._validate_save_constraints(existing, uid, no_overwrite, no_create)
11631165

1164-
if (only_this_recurrence or all_recurrences) and "RECURRENCE-ID" in self.icalendar_component:
1166+
if (
1167+
only_this_recurrence or all_recurrences
1168+
) and "RECURRENCE-ID" in self.icalendar_component:
11651169
obj = await get_self()
11661170
if obj is None:
11671171
raise error.NotFoundError("Could not find parent recurring event")
@@ -1929,9 +1933,7 @@ async def _async_complete(
19291933
# _complete_recurring_* methods are sync-only for now; they internally
19301934
# call self.save() which would return an unawaited coroutine in async mode.
19311935
# This is a known limitation - handle_rrule is not yet async-safe.
1932-
raise NotImplementedError(
1933-
"handle_rrule=True is not yet supported for async clients"
1934-
)
1936+
raise NotImplementedError("handle_rrule=True is not yet supported for async clients")
19351937
self._complete_ical(completion_timestamp=completion_timestamp)
19361938
await self.save()
19371939

docs/source/async_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Accessing Calendars
7171

7272
Use :func:`aio.get_calendars` to list all calendars in one call. Like the
7373
sync version it returns a collection that can be used as an async context
74-
manager — the connection is closed automatically on exit:
74+
manager — the HTTP session is terminated on exit:
7575

7676
.. code-block:: python
7777

0 commit comments

Comments
 (0)