boost-histogram
boost-histogram copied to clipboard
Added comparison function as histogram operation (with colorized + info based string return)

@henryiii, pre-commit throws few errors... Any feedback/suggestion?
It's complaining because you are using the result of re.search without checking to see if it has a result first. I think the best fix, though, is to use ._storage_type, which contains the storage type of the histogram, rather than trying to parse it out of the repr.
I've been looking for something like _storage_type since the beginning (couldn't find it on docs or book here)! But alright now it should work :)
Seems alright now (?)
Note: the goal is to support pytest_assertrepr_compare https://docs.pytest.org/en/latest/how-to/assert.html#defining-your-own-explanation-for-failed-assertions