Hook for Collection.compare_answer

Is your feature request related to a problem? Please describe.
I currently maintain an add-on which overrides some behavior of Collection.compare_answer as a monkey patch, since I didn’t see any hooks available for this. I initially was only using this as a personal project, but it seems like some other people have started using it as well. It was pointed out that implementing this as a monkey patch is not a good idea, since it will break as changes are made, so I would like to be able to implement it using a hook instead.

Describe the solution you’d like
I would like there to be a hook which allows overriding the behavior of Collection.compare_answer so that I can use it for my add-on.

Describe alternatives you’ve considered
Continuing to implement my add-on as a monkey patch.

2 Likes

A PR that adds such a filter would be welcome.

https://addon-docs.ankiweb.net/hooks-and-filters.html

1 Like