MCPcopy
hub / github.com/pimutils/vdirsyncer / __contains__

Method __contains__

vdirsyncer/vobject.py:335–342  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

333 self.props.append(line)
334
335 def __contains__(self, obj):
336 if isinstance(obj, type(self)):
337 return obj not in self.subcomponents and \
338 not any(obj in x for x in self.subcomponents)
339 elif isinstance(obj, str):
340 return self.get(obj, None) is not None
341 else:
342 raise ValueError(obj)
343
344 def __getitem__(self, key):
345 prefix_without_params = '{}:'.format(key)

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected