Deletes the comment.
(self)
| 194 | raise ValueError(f"Unknown source: {self.source}") |
| 195 | |
| 196 | def delete(self): |
| 197 | """ |
| 198 | Deletes the comment. |
| 199 | """ |
| 200 | self._assert_auth() |
| 201 | if self.source == CommentSource.USER_PROFILE: |
| 202 | return user.User(username=self.source_id, _session=self._session).delete_comment(comment_id=self.id) |
| 203 | |
| 204 | elif self.source == CommentSource.PROJECT: |
| 205 | p = project.Project(id=self.source_id, _session=self._session) |
| 206 | p.update() |
| 207 | return p.delete_comment(comment_id=self.id) |
| 208 | |
| 209 | elif self.source == CommentSource.STUDIO: |
| 210 | return studio.Studio(id=self.source_id, _session=self._session).delete_comment(comment_id=self.id) |
| 211 | |
| 212 | return None # raise error? |
| 213 | |
| 214 | def report(self): |
| 215 | """ |
no test coverage detected