MCPcopy Index your code
hub / github.com/python/cpython / set_flags

Method set_flags

Lib/mailbox.py:434–439  ·  view source on GitHub ↗

Set the given flags and unset all others on the keyed message.

(self, key, flags: str)

Source from the content-addressed store, hash-verified

432 return ''
433
434 def set_flags(self, key, flags: str):
435 """Set the given flags and unset all others on the keyed message."""
436 if not isinstance(flags, str):
437 raise TypeError(f'flags must be a string: {type(flags)}')
438 # TODO: check if flags are valid standard flag characters?
439 self.set_info(key, '2,' + ''.join(sorted(set(flags))))
440
441 def add_flag(self, key, flag: str):
442 """Set the given flag(s) without changing others on the keyed message."""

Callers 11

add_flagMethod · 0.95
remove_flagMethod · 0.95
_explain_toMethod · 0.45
_explain_toMethod · 0.45
test_set_flagsMethod · 0.45
test_remove_flagMethod · 0.45
test_flagsMethod · 0.45
test_mboxmmdf_to_mhMethod · 0.45

Calls 3

set_infoMethod · 0.95
setFunction · 0.85
joinMethod · 0.45

Tested by 7

test_set_flagsMethod · 0.36
test_remove_flagMethod · 0.36
test_flagsMethod · 0.36
test_mboxmmdf_to_mhMethod · 0.36