Todo.complete(rrule_mode="this_and_future") raises AttributeError; only the undeclared "thisandfuture" works
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
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, raisesAttributeError.rrule_mode="thisandfuture"works. The integration tests use it (tests/test_async_integration.py:1669), and so does thesave-load.todo.recurrences.thisandfuturefeature name. But a type checker rejects it, since it is not in theLiteral.
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-caldav/caldav
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
python-caldav/caldav#687 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
python-caldav/caldav#749 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
python-caldav/caldav#725 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
python-caldav/caldav#720 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
python-caldav/caldav#704 ·
Maintainers usually reply within 1 day
All issues in python-caldav/caldav
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
darnitdevorg/darnit#587 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
accessibility good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug bug-hunt
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day