Skip to content

Instantly share code, notes, and snippets.

@dev4Fun
Last active February 7, 2020 04:24
Show Gist options
  • Select an option

  • Save dev4Fun/af60713166acba3a863f8f8d1f4e26b7 to your computer and use it in GitHub Desktop.

Select an option

Save dev4Fun/af60713166acba3a863f8f8d1f4e26b7 to your computer and use it in GitHub Desktop.
def _compute_comments_to_ignore(self, comments) -> dict:
to_ignore = {}
for comment in comments:
if comment.author and comment.author.name == self.username:
to_ignore[comment.id] = comment
for reply in comment.replies:
if reply.author and reply.author.name == self.username:
to_ignore[reply.id] = reply
return to_ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment