original_docstring: Return the top users for the month, and their # of reviews.
docstring: Return the top users for the month, and their # of reviews.
docstring_tokens: Return the top users for the month and their # of reviews .
code: def monthly_reviews(self, theme=False):
          """Return the top users for the month, and their # of reviews."""
          qs = self._by_type()
          now = datetime.now()
          created_date = datetime(now.year, now.month, 1)
          actions = ([constants.activity.LOG.THEME_REVIEW.id] if theme
                     else constants.activity.LOG_REVIEWER_REVIEW_ACTION)
          return (qs.values('user', 'user__display_name', 'user__username')
                    .filter(created__gte=created_date,
                            action__in=actions)
                    .exclude(user__id=settings.TASK_USER_ID)
                    .annotate(approval_count=models.Count('id'))
                    .order_by('-approval_count'))
code_tokens: def monthly_reviews ( self , theme = False ) : qs = self . _by_type ( ) now = datetime . now ( ) created_date = datetime ( now . year , now . month , 1 ) actions = ( [ constants . activity . LOG . THEME_REVIEW . id ] if theme else constants . activity . LOG_REVIEWER_REVIEW_ACTION ) return ( qs . values ( 'user' , 'user__display_name' , 'user__username' ) . filter ( created__gte = created_date , action__in = actions ) . exclude ( user__id = settings . TASK_USER_ID ) . annotate ( approval_count = models . Count ( 'id' ) ) . order_by ( '-approval_count' ) )
short_docstring: Return the top users for the month, and their # of reviews.
short_docstring_tokens: Return the top users for the month and their # of reviews .
comment: """Return the top users for the month, and their # of reviews."""