(self)
| 26 | name = "contributors" |
| 27 | |
| 28 | def run(self): |
| 29 | range_ = self.arguments[0] |
| 30 | if range_.endswith("x..HEAD"): |
| 31 | return [nodes.paragraph(), nodes.bullet_list()] |
| 32 | try: |
| 33 | components = build_components(range_) |
| 34 | except git.GitCommandError as exc: |
| 35 | return [ |
| 36 | self.state.document.reporter.warning( |
| 37 | f"Cannot find contributors for range {repr(range_)}: {exc}", |
| 38 | line=self.lineno, |
| 39 | ) |
| 40 | ] |
| 41 | else: |
| 42 | message = nodes.paragraph() |
| 43 | message += nodes.Text(components["author_message"]) |
| 44 | |
| 45 | listnode = nodes.bullet_list() |
| 46 | |
| 47 | for author in components["authors"]: |
| 48 | para = nodes.paragraph() |
| 49 | para += nodes.Text(author) |
| 50 | listnode += nodes.list_item("", para) |
| 51 | |
| 52 | return [message, listnode] |
| 53 | |
| 54 | |
| 55 | def setup(app): |
nothing calls this directly
no test coverage detected