def __getitem__(self, key):
        if self._repo not in key:
            raise KeyError

        raw_obj = self._cache.get(key)
        if obj is None:
            raw_obj = self._repo[key]
            self._cache.set(key, raw_obj)

        # FIXME: how to determin LinkObject?
        for expected_class, return_class in [(dulwich.objects.Blob, BlobObject),
                                             (dulwich.objects.Commit, CommitObject),
                                             (dulwich.objects.Tree, TreeObject)]:
            if isinstance(raw_obj, expected_class):
                return return_class(self, raw_obj)

        raise ObjectTypeMismatch('unknown object: %s' % repr(raw_obj))
dataset/ETHPy150Open nakamuray/blikit/blikit/models.py/ObjectDatabase.__getitem__/swapped operands of `not in`