MCPcopy Index your code
hub / github.com/bpython/bpython / key_help_text

Method key_help_text

bpython/curtsiesfrontend/repl.py:2141–2169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2139 return f"bpython-curtsies version {__version__} using curtsies version {curtsies_version}\n{help_message}"
2140
2141 def key_help_text(self) -> str:
2142 NOT_IMPLEMENTED = (
2143 "suspend",
2144 "cut to buffer",
2145 "search",
2146 "last output",
2147 "yank from buffer",
2148 "cut to buffer",
2149 )
2150 pairs = [
2151 ["complete history suggestion", "right arrow at end of line"],
2152 ["previous match with current line", "up arrow"],
2153 ]
2154 for functionality, key in (
2155 (attr[:-4].replace("_", " "), getattr(self.config, attr))
2156 for attr in self.config.__dict__
2157 if attr.endswith("key")
2158 ):
2159 if functionality in NOT_IMPLEMENTED:
2160 key = "Not Implemented"
2161 if key == "":
2162 key = "Disabled"
2163
2164 pairs.append([functionality, key])
2165
2166 max_func = max(len(func) for func, key in pairs)
2167 return "\n".join(
2168 f"{func.rjust(max_func)} : {key}" for func, key in pairs
2169 )
2170
2171 def get_session_formatted_for_file(self) -> str:
2172 def process():

Callers 1

help_textMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected