Remove this tag from Contact/Favorite tips : This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/wechaty/ wechaty/wiki/Puppet#3-puppet-compatible-table) :param source: :return:
(self, source: Union[Contact, Favorite])
| 97 | # self.puppet.tag_favorite_add(self.tag_id, to) |
| 98 | |
| 99 | def remove(self, source: Union[Contact, Favorite]) -> None: |
| 100 | """ |
| 101 | Remove this tag from Contact/Favorite |
| 102 | |
| 103 | tips : This function is depending on the Puppet Implementation, |
| 104 | see [puppet-compatible-table](https://github.com/wechaty/ |
| 105 | wechaty/wiki/Puppet#3-puppet-compatible-table) |
| 106 | :param source: |
| 107 | :return: |
| 108 | """ |
| 109 | log.info('remove tag for %s with %s', |
| 110 | self.tag_id, |
| 111 | str(source)) |
| 112 | try: |
| 113 | if isinstance(source, Contact): |
| 114 | self.puppet.tag_contact_remove( |
| 115 | tag_id=self.tag_id, contact_id=source.contact_id) |
| 116 | elif isinstance(source, Favorite): |
| 117 | # TODO -> tag_favorite_remove not implement |
| 118 | pass |
| 119 | except Exception as e: |
| 120 | log.info('remove exception %s', str(e.args)) |
| 121 | raise WechatyOperationError('remove error') |
nothing calls this directly
no test coverage detected