Todo.complete(rrule_mode="this_and_future") raises AttributeError; only the undeclared "thisandfuture" works
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 66/100
Línea de trabajo
Empieza en Todo.complete() en caldav/calendarobjectresource.py, donde se declara el Literal rrule_mode y el despacho con getattr construye _complete_recurring_%s. Compáralo con el método _complete_recurring_thisandfuture, cerca de la línea 2293, y luego revisa _async_complete en busca de la misma discrepancia. Está terminado cuando rrule_mode="this_and_future" funciona, ambas grafías se aceptan y tienen tipado, y una prueba unitaria cubre cada valor del Literal.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 412
- Forks
- 113
- Merge medio
- 10 h 29 min
- PR fusionados (30 d)
- 57
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python-caldav/caldav
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python-caldav/caldav#792 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
python-caldav/caldav#788 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
python-caldav/caldav#687 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
python-caldav/caldav#796 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
python-caldav/caldav#784 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de python-caldav/caldav
Issues similares
-
style: article/section 📝 system: cloud.rc ☁️ system: security 🔐
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
uabrc/uabrc.github.io#1262 ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
NCAR/miles-credit#526 ·
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
conda/conda-lock#957 ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws-samples/sample-per-model-bedrock#464 ·
Los mantenedores suelen responder en 1 día