MCPcopy Create free account
hub / github.com/ipython/ipython / in_prompt_tokens

Method in_prompt_tokens

IPython/terminal/prompts.py:29–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27
28
29 def in_prompt_tokens(self):
30 return [
31 (Token.Prompt, self.vi_mode() ),
32 (Token.Prompt, 'In ['),
33 (Token.PromptNum, str(self.shell.execution_count)),
34 (Token.Prompt, ']: '),
35 ]
36
37 def _width(self):
38 return fragment_list_width(self.in_prompt_tokens())

Callers 3

_widthMethod · 0.95
promptMethod · 0.45
get_messageMethod · 0.45

Calls 1

vi_modeMethod · 0.95

Tested by

no test coverage detected