Skip to content

fix: add __contains__ to dict_protocol_catcher to avoid breaking on "in"

I've started working on the horribly tedious task of "making CW works with TIP of yams" and this is a first fix.

The break is introduced in this YAMS commit: (notice the usage of "in" that shouldn't have failed)

Before this commit, doing:

stuff = dict_protocol_catcher(entity)
not_in_entity in stuff

Would break because since contains doesn't exist, getitem is called instead and fails with a KeyError.

Merge request reports