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

Method remove_flag

Lib/mailbox.py:441–446  ·  view source on GitHub ↗

Unset the given string flag(s) without changing others on the keyed message.

(self, key, flag: str)

Source from the content-addressed store, hash-verified

439 self.set_flags(key, ''.join(set(self.get_flags(key)) | set(flag)))
440
441 def remove_flag(self, key, flag: str):
442 """Unset the given string flag(s) without changing others on the keyed message."""
443 if not isinstance(flag, str):
444 raise TypeError(f'flag must be a string: {type(flag)}')
445 if self.get_flags(key):
446 self.set_flags(key, ''.join(set(self.get_flags(key)) - set(flag)))
447
448 def iterkeys(self):
449 """Return an iterator over keys."""

Callers 2

test_remove_flagMethod · 0.45
test_flagsMethod · 0.45

Calls 5

get_flagsMethod · 0.95
set_flagsMethod · 0.95
isinstanceFunction · 0.85
setFunction · 0.85
joinMethod · 0.45

Tested by 2

test_remove_flagMethod · 0.36
test_flagsMethod · 0.36