()
| 807 | |
| 808 | |
| 809 | def _contributors_picker() -> str: |
| 810 | lines: str = "" |
| 811 | |
| 812 | try: |
| 813 | with resources.files(mycli_package).joinpath("AUTHORS").open('r') as f: |
| 814 | lines += f.read() |
| 815 | except FileNotFoundError: |
| 816 | pass |
| 817 | |
| 818 | contents = [] |
| 819 | for line in lines.split("\n"): |
| 820 | if m := re.match(r"^ *\* (.*)", line): |
| 821 | contents.append(m.group(1)) |
| 822 | return random.choice(contents) if contents else 'our contributors' |
| 823 | |
| 824 | |
| 825 | def _sponsors_picker() -> str: |
no test coverage detected