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