Return what should be in the left-hand margin for line 'lineno'.
(self, lineno: int, cursor_on_line: bool)
| 482 | return self.arg |
| 483 | |
| 484 | def get_prompt(self, lineno: int, cursor_on_line: bool) -> str: |
| 485 | """Return what should be in the left-hand margin for line |
| 486 | 'lineno'.""" |
| 487 | if self.arg is not None and cursor_on_line: |
| 488 | prompt = f"(arg: {self.arg}) " |
| 489 | elif self.paste_mode: |
| 490 | prompt = "(paste) " |
| 491 | elif "\n" in self.buffer: |
| 492 | if lineno == 0: |
| 493 | prompt = self.ps2 |
| 494 | elif self.ps4 and lineno == self.buffer.count("\n"): |
| 495 | prompt = self.ps4 |
| 496 | else: |
| 497 | prompt = self.ps3 |
| 498 | else: |
| 499 | prompt = self.ps1 |
| 500 | |
| 501 | if self.can_colorize: |
| 502 | t = THEME() |
| 503 | prompt = f"{t.prompt}{prompt}{t.reset}" |
| 504 | return prompt |
| 505 | |
| 506 | def push_input_trans(self, itrans: input.KeymapTranslator) -> None: |
| 507 | self.input_trans_stack.append(self.input_trans) |
no test coverage detected