MCPcopy Index your code
hub / github.com/dbcli/mycli / _contributors_picker

Function _contributors_picker

mycli/main_modes/repl.py:809–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

807
808
809def _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
825def _sponsors_picker() -> str:

Callers 1

_show_startup_bannerFunction · 0.85

Calls 4

openMethod · 0.80
joinpathMethod · 0.80
readMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected