| 418 | return self.Value(contributors, normalized, "GitHub contributors", explanation) |
| 419 | |
| 420 | def score_last_commit(self) -> Union[Value, NA]: |
| 421 | if self.github is None: |
| 422 | return self.NA("Recent commit") |
| 423 | |
| 424 | last_commit = utils.parse_iso_8601(self.github.repo["pushed_at"]) |
| 425 | |
| 426 | if last_commit + datetime.timedelta(days=31*3) >= self.now: |
| 427 | val = 1 |
| 428 | note = "< 3m" |
| 429 | else: |
| 430 | val = 0 |
| 431 | note = "> 3m" |
| 432 | |
| 433 | return self.Value(val, val, "Recent commit", f"{note} (+{val})") |
| 434 | |
| 435 | def score_is_new_on_github(self) -> Union[Value, NA]: |
| 436 | if self.github is None: |