MCPcopy Index your code
hub / github.com/RustPython/RustPython / set_flags

Method set_flags

Lib/mailbox.py:427–432  ·  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

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

Callers 12

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
spawnMethod · 0.45

Calls 5

set_infoMethod · 0.95
isinstanceFunction · 0.85
sortedFunction · 0.85
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