Add a mechanism to allow overriding classes.
Permit it would allow users to implement custom behavior without having to monkey-patch the code.
Example:
class MyCustomRepetition(Repetition):
def __init__(self, *args, **kwargs):
# custom behavior
pass
class MyCustomRepeatedEvent(Repetition):
def __init__(self, *args, **kwargs):
# custom behavior
pass
# Pass classes to `of` method (which will propagate options)
recurring_ical_events.of(calendar, repetition_cls=MyCustomRepetition, repeated_event_cls=MyCustomRepeatedEvent)
# or maybe with a dict
class_overrides = {
Repetition: MyCustomRepetition,
RepeatedEvent: MyCustomRepeatedEvent,
}
recurring_ical_events.of(calendar, class_overrides=class_overrides)
I'm not sure what is the good to way to do this kind of library customization.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too