Set the given flag(s) without changing others on the keyed message.
(self, key, flag: str)
| 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.""" |
| 443 | if not isinstance(flag, str): |
| 444 | raise TypeError(f'flag must be a string: {type(flag)}') |
| 445 | # TODO: check that flag is a valid standard flag character? |
| 446 | self.set_flags(key, ''.join(set(self.get_flags(key)) | set(flag))) |
| 447 | |
| 448 | def remove_flag(self, key, flag: str): |
| 449 | """Unset the given string flag(s) without changing others on the keyed message.""" |