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

Function format_tokens

bpython/urwid.py:273–281  ·  view source on GitHub ↗
(tokensource)

Source from the content-addressed store, hash-verified

271
272
273def format_tokens(tokensource):
274 for token, text in tokensource:
275 if text == "\n":
276 continue
277
278 # TODO: something about inversing Parenthesis
279 while token not in theme_map:
280 token = token.parent
281 yield (theme_map[token], text)
282
283
284class BPythonEdit(urwid.Edit):

Callers 3

reprint_lineMethod · 0.85
on_input_changeMethod · 0.85
on_edit_pos_changedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected