Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Todo.complete(rrule_mode="this_and_future") raises AttributeError; only the undeclared "thisandfuture" works

Closed Beginner friendly
#735 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@muratatar06 is already working on this.

Since Oct 10, 2026.

  • #736 by @muratatar06 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start at Todo.complete() in caldav/calendarobjectresource.py, where the rrule_mode Literal is declared and the getattr dispatch builds _complete_recurring_%s. Compare that with the method named _complete_recurring_thisandfuture near line 2293, then check _async_complete for the same mismatch. Done when rrule_mode="this_and_future" works, both spellings are accepted and typed, and a unit test covers each Literal value.

Written by the indexing model from the issue text.

Description

Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5 (Claude Code). It was found by a clean-context review of the calendaring API spec


Todo.complete() declares

rrule_mode: Literal["safe", "this_and_future"] = "safe",

and its docstring lists this_and_future, but it dispatches with

getattr(self, "_complete_recurring_%s" % rrule_mode)(completion_timestamp)

and the method is called _complete_recurring_thisandfuture. So:

  • complete(handle_rrule=True, rrule_mode="this_and_future"), the spelling the type and the docs promise, raises AttributeError.
  • rrule_mode="thisandfuture" works. The integration tests use it (tests/test_async_integration.py:1669), and so does the save-load.todo.recurrences.thisandfuture feature name. But a type checker rejects it, since it is not in the Literal.

Seen in caldav/calendarobjectresource.py at v3.4.0-9 (complete around line 2318, the dispatch at line 2348, the method at line 2293). The async path (_async_complete) should be checked for the same problem.

Possible fix: accept both spellings, mapping "this_and_future" to "thisandfuture" (or the other way round), put both in the Literal, and add a unit test that calls complete() with each value in the Literal.

Dominant language
Python
Stars
412
Forks
113
Avg merge
1d 14h
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-caldav/caldav

All issues in python-caldav/caldav

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.