Set the given flags and unset all others on the keyed message.
(self, key, flags: str)
| 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.""" |