(self)
| 47 | self.category = category |
| 48 | |
| 49 | def categorize(self): |
| 50 | commits = self.commits.filter(category=self.category) |
| 51 | total_commits = len(self.commits.commits) |
| 52 | already_done = total_commits - len(commits) |
| 53 | i = 0 |
| 54 | while i < len(commits): |
| 55 | cur_commit = commits[i] |
| 56 | next_commit = commits[i + 1] if i + 1 < len(commits) else None |
| 57 | jump_to = self.handle_commit( |
| 58 | cur_commit, already_done + i + 1, total_commits, commits |
| 59 | ) |
| 60 | |
| 61 | # Increment counter |
| 62 | if jump_to is not None: |
| 63 | i = jump_to |
| 64 | elif next_commit is None: |
| 65 | i = len(commits) |
| 66 | else: |
| 67 | i = commits.index(next_commit) |
| 68 | |
| 69 | def features(self, commit): |
| 70 | return self.cache.get(commit.commit_hash) |
no test coverage detected