Currently, hooks are global and called by any reporter on save.
This was only done for a technical restriction earlier that is no longer present. Make hooks a property of a given reporter (so that report_hook is a context manager but now it's a method of a reporter instance and works the same way), so that hooks are still context-dependent but now also tied to a single reporter.
Currently, hooks are global and called by any reporter on save.
This was only done for a technical restriction earlier that is no longer present. Make hooks a property of a given reporter (so that report_hook is a context manager but now it's a method of a reporter instance and works the same way), so that hooks are still context-dependent but now also tied to a single reporter.