Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save dev4Fun/474e4bbae3a1e7d7b54fbae0979e5e4c to your computer and use it in GitHub Desktop.
def _process_submission(self, submission):
...
if submission_id not in self.passed_submissions:
...
self.passed_submissions.add(submission_id)
comments_to_ignore = self._compute_comments_to_ignore(comments)
comment_count = None
if not comments_to_ignore:
comment_count = self._process_comments(comments)
logging.info(
f"{self.username} - Processed '{submission.title}'." +
(f" Upvoted and replied to {comment_count} comments" if comment_count else ""))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment