robotcode-repl 2.9.0.dev124__tar.gz → 2.9.0.dev180__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/PKG-INFO +2 -2
  2. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/pyproject.toml +1 -1
  3. robotcode_repl-2.9.0.dev180/src/robotcode/repl/__version__.py +1 -0
  4. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_debug/controller.py +7 -8
  5. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_session.py +2 -0
  6. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/cli.py +7 -7
  7. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/console_interpreter.py +73 -34
  8. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/doc_cli.py +5 -5
  9. robotcode_repl-2.9.0.dev124/src/robotcode/repl/__version__.py +0 -1
  10. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/.gitignore +0 -0
  11. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/README.md +0 -0
  12. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/Repl/__init__.py +0 -0
  13. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/Repl/repl.py +0 -0
  14. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/__init__.py +0 -0
  15. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_backends.py +0 -0
  16. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_debug/__init__.py +0 -0
  17. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_debug/types.py +0 -0
  18. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_indent.py +0 -0
  19. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_keyword_lookup.py +0 -0
  20. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_progress.py +0 -0
  21. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/__init__.py +0 -0
  22. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/completion.py +0 -0
  23. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/components.py +0 -0
  24. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/doc_viewer.py +0 -0
  25. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/history.py +0 -0
  26. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_pt/lexer.py +0 -0
  27. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/_session_export.py +0 -0
  28. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/base_interpreter.py +0 -0
  29. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/hooks.py +0 -0
  30. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/prompt_toolkit_interpreter.py +0 -0
  31. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/py.typed +0 -0
  32. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/run.py +0 -0
  33. {robotcode_repl-2.9.0.dev124 → robotcode_repl-2.9.0.dev180}/src/robotcode/repl/session_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: robotcode-repl
3
- Version: 2.9.0-dev.124
3
+ Version: 2.9.0-dev.180
4
4
  Summary: RobotCode REPL for Robot Framework
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -27,7 +27,7 @@ Classifier: Topic :: Utilities
27
27
  Classifier: Typing :: Typed
28
28
  Requires-Python: >=3.10
29
29
  Requires-Dist: prompt-toolkit!=3.0.52
30
- Requires-Dist: robotcode-runner==2.9.0-dev.124
30
+ Requires-Dist: robotcode-runner==2.9.0-dev.180
31
31
  Description-Content-Type: text/markdown
32
32
 
33
33
  # robotcode-repl
@@ -29,7 +29,7 @@ classifiers = [
29
29
  ]
30
30
  dynamic = ["version"]
31
31
  dependencies = [
32
- "robotcode-runner==2.9.0-dev.124",
32
+ "robotcode-runner==2.9.0-dev.180",
33
33
  "prompt_toolkit!=3.0.52"
34
34
  ]
35
35
 
@@ -0,0 +1 @@
1
+ __version__ = "2.9.0-dev.180"
@@ -23,6 +23,7 @@ from robot.variables import evaluate_expression
23
23
 
24
24
  from robotcode.core.utils.path import normalized_path
25
25
  from robotcode.robot.utils import RF_VERSION
26
+ from robotcode.robot.utils.variables import is_variable
26
27
 
27
28
  from ..base_interpreter import result_definition_names, result_qualified_name
28
29
  from .types import (
@@ -91,9 +92,7 @@ _BREAKPOINT_MARKER = "robotcode.repl.Repl.Breakpoint"
91
92
  # Sentinel "stop at any depth" marker for step-in.
92
93
  _ANY_DEPTH = 1 << 30
93
94
 
94
- # Matches a SINGLE bare variable token (`${x}`, `@{x}`, `&{x}`, optional `[item]`).
95
- # `[^{}]*` (not `.*`) keeps a multi-variable expression like `${a} + ${b}` out —
96
- # it isn't one variable, so it falls through to expression evaluation.
95
+ # Matches the decorated name of a variable to set (`${x}`, `@{x}`, `&{x}`, optional `[item]`).
97
96
  _IS_VARIABLE_RE = re.compile(r"^[$@&]\{[^{}]*\}(\[[^\]]*\])?$")
98
97
 
99
98
  # Keeps value reprs in the variable view bounded, so a giant list/dict/string
@@ -402,14 +401,14 @@ class DebugController:
402
401
  def evaluate_expression(self, frame: StackFrame, expression: str) -> Any:
403
402
  """Evaluate `expression` in `frame`'s scope and return the value.
404
403
 
405
- A bare variable reference (``${x}``, ``@{x}``, ``${x}[0]``) returns the
406
- raw value with its type preserved (`replace_scalar` resolves item access
407
- too); anything else is variable-substituted then evaluated as a Robot
408
- expression (so ``${x} + 1`` works).
404
+ One variable as Robot Framework defines it (``${x}``, ``@{x}``, ``${x}[0]``,
405
+ ``${${x}}``, ``${{1 + 1}}``) returns its value with the type preserved;
406
+ anything else is variable-substituted then evaluated as a Robot expression
407
+ (so ``${x} + 1`` works).
409
408
  """
410
409
  store = self._frame_store(frame)
411
410
  expression = expression.strip()
412
- if _IS_VARIABLE_RE.match(expression):
411
+ if is_variable(expression):
413
412
  return store.replace_scalar(expression)
414
413
  return _evaluate_value(store.replace_string(expression), store)
415
414
 
@@ -1200,6 +1200,8 @@ class SessionInterpreter(ConsoleInterpreter):
1200
1200
  return
1201
1201
  if text.lstrip().startswith(".") and self._dispatch_dot_command(text):
1202
1202
  return
1203
+ if self._show_variable(text):
1204
+ return
1203
1205
  # The input runs as a whole, as a script file does; a block it leaves unfinished fails with what Robot
1204
1206
  # Framework says it lacks.
1205
1207
  parsed = self.parse_input(text)
@@ -259,7 +259,7 @@ REPL_BASE_OPTIONS = [
259
259
  help="Force a specific input backend instead of auto-picking. "
260
260
  "`auto` and `prompt-toolkit` both pick the prompt-toolkit-driven "
261
261
  "interpreter (completion, syntax highlighting, history, doc viewer). "
262
- "`plain` drops to a bare `input()` prompt — useful when ANSI escapes "
262
+ "`plain` drops to a bare `input()` prompt, useful when ANSI escapes "
263
263
  "or popups would interfere with the surrounding capture.",
264
264
  ),
265
265
  click.option(
@@ -267,7 +267,7 @@ REPL_BASE_OPTIONS = [
267
267
  is_flag=True,
268
268
  default=False,
269
269
  envvar="ROBOTCODE_REPL_PLAIN",
270
- help="Shorthand for `--backend=plain`. Disables all prompt enhancements — "
270
+ help="Shorthand for `--backend=plain`. Disables all prompt enhancements: "
271
271
  "completion, syntax highlighting, candidate popup, auto-suggest, history "
272
272
  "file. The prompt becomes a bare `input()` call. Recommended for "
273
273
  "AI-agent invocations, automation pipelines, and any context where ANSI "
@@ -448,8 +448,8 @@ DEBUG_OPTIONS = [
448
448
  click.option(
449
449
  "--debugger-attached/--no-debugger-attached",
450
450
  default=None,
451
- help="Whether the debugger is active. While detached nothing pauses — a "
452
- "failing keyword just prints its error and you stay at the prompt — but "
451
+ help="Whether the debugger is active. While detached nothing pauses (a "
452
+ "failing keyword just prints its error and you stay at the prompt), but "
453
453
  "breakpoints and exception filters stay configured. Default: attached "
454
454
  "for `robot-debug`; for `repl` detached, unless a pause trigger "
455
455
  "(`--break`, a `--break-on-*` flag) is given. Toggle at runtime with "
@@ -460,21 +460,21 @@ DEBUG_OPTIONS = [
460
460
  "break_at",
461
461
  metavar="LOCATION",
462
462
  multiple=True,
463
- help="Break at LOCATION — a `file:line`, where the end of the path is enough, or a keyword name "
463
+ help="Break at LOCATION: a `file:line`, where the end of the path is enough, or a keyword name "
464
464
  "or glob pattern matched like Robot Framework. Repeatable.",
465
465
  ),
466
466
  click.option(
467
467
  "--break-on-exception/--no-break-on-exception",
468
468
  default=None,
469
469
  help="Break at an uncaught failing keyword (not caught by TRY/EXCEPT or "
470
- "`Run Keyword And …`), before the failure unwinds. Armed by default; it "
470
+ "`Run Keyword And ...`), before the failure unwinds. Armed by default; it "
471
471
  "only pauses while the debugger is attached (see `--debugger-attached`).",
472
472
  ),
473
473
  click.option(
474
474
  "--break-on-all-exceptions/--no-break-on-all-exceptions",
475
475
  default=False,
476
476
  show_default=True,
477
- help="Break at EVERY failing keyword, even ones caught by TRY/EXCEPT or `Run Keyword And …`.",
477
+ help="Break at EVERY failing keyword, even ones caught by TRY/EXCEPT or `Run Keyword And ...`.",
478
478
  ),
479
479
  click.option(
480
480
  "--break-on-failed-test/--no-break-on-failed-test",
@@ -15,6 +15,7 @@ the session commands (`.kw`, `.doc`, `.vars`, …) and the debugger commands
15
15
  """
16
16
 
17
17
  import argparse
18
+ import contextlib
18
19
  import inspect
19
20
  import os
20
21
  import pprint
@@ -49,6 +50,7 @@ from robotcode.robot.diagnostics.library_doc import (
49
50
  from robotcode.robot.utils import RF_VERSION, get_robot_version_str
50
51
  from robotcode.robot.utils.markdown_docs import LinkResolver, anchor_link_resolver, normalize_markdown_doc
51
52
  from robotcode.robot.utils.markdownformatter import MarkDownFormatter
53
+ from robotcode.robot.utils.variables import is_variable
52
54
 
53
55
  from .__version__ import __version__
54
56
  from ._debug.types import Breakpoint, ResumeAction, StackFrame, StopEvent, StopReason
@@ -122,6 +124,16 @@ _repr.maxlist = _repr.maxtuple = _repr.maxset = _repr.maxdeque = 20
122
124
  _repr.maxdict = 50
123
125
 
124
126
 
127
+ @contextlib.contextmanager
128
+ def _interruptible() -> Iterator[None]:
129
+ """Ctrl-C only interrupts a running keyword, and an expression can run for as long as one."""
130
+ try:
131
+ STOP_SIGNAL_MONITOR.start_running_keyword(False)
132
+ yield
133
+ finally:
134
+ STOP_SIGNAL_MONITOR.stop_running_keyword()
135
+
136
+
125
137
  def dot_command(name: str, *aliases: str, group: str = "Session") -> Callable[[F], F]:
126
138
  """Mark a ``ConsoleInterpreter`` method as a dot-command handler.
127
139
 
@@ -458,7 +470,7 @@ class ConsoleInterpreter(BaseInterpreter):
458
470
  if len(matches) == 1:
459
471
  return long_to_attr[matches[0]], None
460
472
  if len(matches) > 1:
461
- return None, f"Ambiguous dot-command .{token} — matches: {', '.join('.' + m for m in matches)}"
473
+ return None, f"Ambiguous dot-command .{token}: it matches {', '.join('.' + m for m in matches)}"
462
474
  return None, f"Unknown dot-command: .{token}. Try .help."
463
475
 
464
476
  def _dispatch_dot_command(self, line: str) -> bool:
@@ -784,7 +796,7 @@ class ConsoleInterpreter(BaseInterpreter):
784
796
  parts.append(f"({loc})")
785
797
  line = " ".join(parts)
786
798
  if stop.description:
787
- line += f" — {stop.description}"
799
+ line += f" - {stop.description}"
788
800
  self._echo(line)
789
801
  self._show_displays()
790
802
 
@@ -865,6 +877,16 @@ class ConsoleInterpreter(BaseInterpreter):
865
877
  don't re-trigger a stop, and in `forward_events(echo_messages=True)` so
866
878
  its log output surfaces at the prompt (suite output is muted otherwise).
867
879
  """
880
+ # One variable is no statement, and reading it writes nothing: it also works at the end of a suite.
881
+ if is_variable(line.strip()):
882
+ try:
883
+ with _interruptible():
884
+ value = self._controller.evaluate_expression(self._selected_frame(), line) # type: ignore[union-attr]
885
+ except Exception as e: # surface lookup/eval failures to the prompt
886
+ self._echo(f"! {e}")
887
+ return False
888
+ self._echo(f"=> {_repr.repr(value)}")
889
+ return True
868
890
  # At the end of a suite Robot Framework has already closed the suite in
869
891
  # output.xml when we stop; a keyword written after it makes the file unreadable.
870
892
  if self._stop is not None and self._stop.reason == StopReason.EXCEPTION and self._stop.frame.type == "SUITE":
@@ -951,6 +973,21 @@ class ConsoleInterpreter(BaseInterpreter):
951
973
  self.log_message(error, "FAIL")
952
974
  yield item
953
975
 
976
+ def _show_variable(self, text: str) -> bool:
977
+ """Show the value of an input that is one variable, which is no statement; returns whether `text` is one."""
978
+ variable = text.strip()
979
+ if not is_variable(variable):
980
+ return False
981
+ try:
982
+ with _interruptible():
983
+ value = EXECUTION_CONTEXTS.current.variables.replace_scalar(variable)
984
+ except Exception as e:
985
+ message = str(e)
986
+ self.log_message(message, "FAIL")
987
+ raise ExecutionFailed(message) from e
988
+ self._echo(f"=> {_repr.repr(value)}")
989
+ return True
990
+
954
991
  def get_input(self) -> Iterator[Optional[Keyword]]:
955
992
  if self.executed_files and not self.files and not self.inspect:
956
993
  raise EOFError
@@ -992,6 +1029,8 @@ class ConsoleInterpreter(BaseInterpreter):
992
1029
  if not lines and text.lstrip().startswith(".") and self.app is not None:
993
1030
  if self._dispatch_dot_command(text):
994
1031
  return
1032
+ if not lines and self._show_variable(text):
1033
+ return
995
1034
  except KeyboardInterrupt:
996
1035
  # Ctrl-C drops what was typed, as in Python's REPL; the session goes on.
997
1036
  self._report_interrupt(prompt)
@@ -1143,11 +1182,11 @@ class ConsoleInterpreter(BaseInterpreter):
1143
1182
  for long in sorted(longs):
1144
1183
  alias_str = ", ".join(f"`.{a}`" for a in sorted(aliases_of.get(long, [])))
1145
1184
  head = f"`.{long}`" + (f" ({alias_str})" if alias_str else "")
1146
- md_lines.append(f"- {head} — {summaries[long] or '(no description)'}")
1185
+ md_lines.append(f"- {head} - {summaries[long] or '(no description)'}")
1147
1186
  md_lines.append("")
1148
1187
  md_lines.append("Type `.help <command>` for usage details.")
1149
1188
  md_lines.append("")
1150
- md_lines.append("**Shortcuts**: F1=help · Tab=complete · ^R=search · ^L=clear · ^D=exit")
1189
+ md_lines.append("**Shortcuts**: F1=help, Tab=complete, ^R=search, ^L=clear, ^D=exit")
1151
1190
  self.show_doc("Dot-commands", "\n".join(md_lines))
1152
1191
 
1153
1192
  @dot_command("imports")
@@ -1207,7 +1246,7 @@ class ConsoleInterpreter(BaseInterpreter):
1207
1246
 
1208
1247
  Options:
1209
1248
  --user Hide Robot's built-in variables (`${SUITE_NAME}`,
1210
- `${OUTPUT_DIR}`, `${TEMPDIR}`, `${True}`, …) and the
1249
+ `${OUTPUT_DIR}`, `${TEMPDIR}`, `${True}`, ...) and the
1211
1250
  result variable `${_}` so the listing focuses on what the
1212
1251
  session or the suite defined. At a debug stop it filters
1213
1252
  every scope of the listing.
@@ -1233,7 +1272,7 @@ class ConsoleInterpreter(BaseInterpreter):
1233
1272
  except Exception:
1234
1273
  rep = "<unprintable>"
1235
1274
  if len(rep) > 60:
1236
- rep = rep[:59] + "…"
1275
+ rep = rep[:57] + "..."
1237
1276
  rows.append((name, rep))
1238
1277
 
1239
1278
  if not rows:
@@ -1438,7 +1477,7 @@ class ConsoleInterpreter(BaseInterpreter):
1438
1477
  def _cwd(self, arg: str) -> None:
1439
1478
  """Show the current working directory.
1440
1479
 
1441
- Print the working directory of the REPL process — the project root.
1480
+ Print the working directory of the REPL process, which is the project root.
1442
1481
  Relative file paths passed to keywords such as `File Should Exist`
1443
1482
  resolve against it. `${CURDIR}` and, on Robot Framework 7.4 and newer,
1444
1483
  relative imports use the directory of `--source` instead, or the
@@ -1470,7 +1509,7 @@ class ConsoleInterpreter(BaseInterpreter):
1470
1509
  .exit 3
1471
1510
  """
1472
1511
  if self._stop is not None:
1473
- self._dot_command_failed("at a debug stop — use .continue or .detach to resume, or .abort to quit the run")
1512
+ self._dot_command_failed("at a debug stop; use .continue or .detach to resume, or .abort to quit the run")
1474
1513
  return
1475
1514
  if arg:
1476
1515
  try:
@@ -1525,11 +1564,11 @@ class ConsoleInterpreter(BaseInterpreter):
1525
1564
 
1526
1565
  recorded: List[str] = list(self._session_lines or [])
1527
1566
  if not recorded:
1528
- self.app.echo("Nothing to save — the session has no recorded inputs yet.")
1567
+ self.app.echo("Nothing to save: the session has no recorded inputs yet.")
1529
1568
  return
1530
1569
  lines = [line for i, line in enumerate(recorded) if opts.keep_failed or i not in self._failed_session_lines]
1531
1570
  if not lines:
1532
- self.app.echo("Nothing to save — every recorded input failed; `--keep-failed` exports them anyway.")
1571
+ self.app.echo("Nothing to save: every recorded input failed; `--keep-failed` exports them anyway.")
1533
1572
  return
1534
1573
 
1535
1574
  content = render_robot_file(lines, test_name=opts.test_name)
@@ -1640,7 +1679,7 @@ class ConsoleInterpreter(BaseInterpreter):
1640
1679
  """Show the source at the current stop.
1641
1680
 
1642
1681
  prompt_toolkit: the whole file in the scrollable viewer, scrolled to the
1643
- current line (marked `->`). Plain backend: a ±5-line inline window."""
1682
+ current line (marked `->`). Plain backend: a +/-5-line inline window."""
1644
1683
  del arg
1645
1684
  if not self._require_stop():
1646
1685
  return
@@ -1653,12 +1692,12 @@ class ConsoleInterpreter(BaseInterpreter):
1653
1692
 
1654
1693
  @dot_command("source", group="Debugger")
1655
1694
  def _source(self, arg: str) -> None:
1656
- """Show a keyword's source — `.source Open Browser`.
1695
+ """Show a keyword's source: `.source Open Browser`.
1657
1696
 
1658
1697
  On prompt_toolkit it opens the scrollable doc viewer at the keyword's
1659
1698
  definition (marked with `->`). On the plain backend it prints inline from
1660
1699
  the definition line downward; a trailing count sets how many lines
1661
- (default 10) — `.source Open Browser 25`.
1700
+ (default 10): `.source Open Browser 25`.
1662
1701
  """
1663
1702
  if not arg:
1664
1703
  self._dot_command_failed("usage: .source <keyword-name> [lines]")
@@ -1705,7 +1744,7 @@ class ConsoleInterpreter(BaseInterpreter):
1705
1744
 
1706
1745
  @dot_command("frame", "f", group="Debugger")
1707
1746
  def _frame(self, arg: str) -> None:
1708
- """Select a frame by number — `.frame 2` (#0 is the innermost)."""
1747
+ """Select a frame by number: `.frame 2` (#0 is the innermost)."""
1709
1748
  if not self._require_stop():
1710
1749
  return
1711
1750
  try:
@@ -1718,7 +1757,7 @@ class ConsoleInterpreter(BaseInterpreter):
1718
1757
 
1719
1758
  @dot_command("print", "p", group="Debugger")
1720
1759
  def _print(self, arg: str) -> None:
1721
- """Evaluate a variable or expression in the selected frame — `.print ${x}`."""
1760
+ """Evaluate a variable or expression in the selected frame: `.print ${x}`."""
1722
1761
  if not self._require_stop():
1723
1762
  return
1724
1763
  if not arg:
@@ -1733,7 +1772,7 @@ class ConsoleInterpreter(BaseInterpreter):
1733
1772
 
1734
1773
  @dot_command("pprint", "pp", group="Debugger")
1735
1774
  def _pprint(self, arg: str) -> None:
1736
- """Pretty-print a variable or expression in the selected frame — `.pprint ${x}`."""
1775
+ """Pretty-print a variable or expression in the selected frame: `.pprint ${x}`."""
1737
1776
  if not self._require_stop():
1738
1777
  return
1739
1778
  if not arg:
@@ -1748,7 +1787,7 @@ class ConsoleInterpreter(BaseInterpreter):
1748
1787
 
1749
1788
  @dot_command("whatis", group="Debugger")
1750
1789
  def _whatis(self, arg: str) -> None:
1751
- """Show the type of a variable or expression in the selected frame — `.whatis ${x}`."""
1790
+ """Show the type of a variable or expression in the selected frame: `.whatis ${x}`."""
1752
1791
  if not self._require_stop():
1753
1792
  return
1754
1793
  if not arg:
@@ -1763,7 +1802,7 @@ class ConsoleInterpreter(BaseInterpreter):
1763
1802
 
1764
1803
  @dot_command("display", group="Debugger")
1765
1804
  def _display(self, arg: str) -> None:
1766
- """Show an expression's value at every stop — `.display ${x}`; bare `.display` lists them."""
1805
+ """Show an expression's value at every stop: `.display ${x}`; bare `.display` lists them."""
1767
1806
  if not arg:
1768
1807
  if not self._display_exprs:
1769
1808
  self._echo("(no display expressions)")
@@ -1780,7 +1819,7 @@ class ConsoleInterpreter(BaseInterpreter):
1780
1819
 
1781
1820
  @dot_command("undisplay", group="Debugger")
1782
1821
  def _undisplay(self, arg: str) -> None:
1783
- """Stop displaying an expression — `.undisplay ${x}`; bare `.undisplay` clears all."""
1822
+ """Stop displaying an expression: `.undisplay ${x}`; bare `.undisplay` clears all."""
1784
1823
  if not arg:
1785
1824
  self._display_exprs.clear()
1786
1825
  self._echo("display list cleared")
@@ -1793,14 +1832,14 @@ class ConsoleInterpreter(BaseInterpreter):
1793
1832
 
1794
1833
  @dot_command("set", group="Debugger")
1795
1834
  def _set(self, arg: str) -> None:
1796
- """Change an existing scalar variable in the selected frame — `.set ${x} <value>`.
1835
+ """Change an existing scalar variable in the selected frame: `.set ${x} <value>`.
1797
1836
 
1798
1837
  Only variables that already exist can be changed; create a new one with
1799
- `${x}= Set Variable …` at the prompt. The value is
1838
+ `${x}= Set Variable ...` at the prompt. The value is
1800
1839
  variable-substituted and stored as a string: `.set ${name} hello` sets
1801
1840
  `hello`, and `.set ${count} 7` sets the string `7`. For other types,
1802
1841
  assign at the prompt, e.g. `${items}= Evaluate [1, 2]`. Only whole
1803
- scalar variables (`${...}`) are supported — not list/dict variables
1842
+ scalar variables (`${...}`) are supported, not list/dict variables
1804
1843
  (`@{...}`/`&{...}`) or item access (`${x}[0]`). The value lands in the
1805
1844
  selected frame's local scope.
1806
1845
  """
@@ -1850,12 +1889,12 @@ class ConsoleInterpreter(BaseInterpreter):
1850
1889
 
1851
1890
  @dot_command("break", "b", group="Debugger")
1852
1891
  def _break(self, arg: str) -> None:
1853
- """Add a breakpoint — `.break file:line` / `.break Keyword Name or pattern` / `.break <loc>, <condition>`."""
1892
+ """Add a breakpoint: `.break file:line` / `.break Keyword Name or pattern` / `.break <loc>, <condition>`."""
1854
1893
  self._add_breakpoint(arg, temporary=False)
1855
1894
 
1856
1895
  @dot_command("tbreak", group="Debugger")
1857
1896
  def _tbreak(self, arg: str) -> None:
1858
- """Add a one-shot breakpoint, removed after it first stops — same syntax as `.break`."""
1897
+ """Add a one-shot breakpoint, removed after it first stops; same syntax as `.break`."""
1859
1898
  self._add_breakpoint(arg, temporary=True)
1860
1899
 
1861
1900
  @dot_command("breakpoints", "bp", group="Debugger")
@@ -1905,7 +1944,7 @@ class ConsoleInterpreter(BaseInterpreter):
1905
1944
 
1906
1945
  @dot_command("condition", group="Debugger")
1907
1946
  def _condition(self, arg: str) -> None:
1908
- """Set or clear a breakpoint condition — `.condition <n> <expr>` (bare `.condition <n>` clears it)."""
1947
+ """Set or clear a breakpoint condition: `.condition <n> <expr>` (bare `.condition <n>` clears it)."""
1909
1948
  if not self._require_controller():
1910
1949
  return
1911
1950
  parts = arg.split(None, 1)
@@ -1923,7 +1962,7 @@ class ConsoleInterpreter(BaseInterpreter):
1923
1962
 
1924
1963
  @dot_command("ignore", group="Debugger")
1925
1964
  def _ignore(self, arg: str) -> None:
1926
- """Skip a breakpoint's next N hits — `.ignore <n> <count>`."""
1965
+ """Skip a breakpoint's next N hits: `.ignore <n> <count>`."""
1927
1966
  if not self._require_controller():
1928
1967
  return
1929
1968
  parts = arg.split()
@@ -1947,7 +1986,7 @@ class ConsoleInterpreter(BaseInterpreter):
1947
1986
 
1948
1987
  @dot_command("delete", group="Debugger")
1949
1988
  def _delete(self, arg: str) -> None:
1950
- """Remove a breakpoint — `.delete <n>`; bare `.delete` removes all."""
1989
+ """Remove a breakpoint: `.delete <n>`; bare `.delete` removes all."""
1951
1990
  if not self._require_controller():
1952
1991
  return
1953
1992
  controller = self._controller
@@ -1982,20 +2021,20 @@ class ConsoleInterpreter(BaseInterpreter):
1982
2021
 
1983
2022
  @dot_command("disable", group="Debugger")
1984
2023
  def _disable(self, arg: str) -> None:
1985
- """Disable a breakpoint — `.disable <n>`; bare `.disable` disables all."""
2024
+ """Disable a breakpoint: `.disable <n>`; bare `.disable` disables all."""
1986
2025
  self._set_bp_enabled(arg, False)
1987
2026
 
1988
2027
  @dot_command("enable", group="Debugger")
1989
2028
  def _enable(self, arg: str) -> None:
1990
- """Enable a breakpoint — `.enable <n>`; bare `.enable` enables all."""
2029
+ """Enable a breakpoint: `.enable <n>`; bare `.enable` enables all."""
1991
2030
  self._set_bp_enabled(arg, True)
1992
2031
 
1993
2032
  @dot_command("commands", group="Debugger")
1994
2033
  def _commands(self, arg: str) -> None:
1995
- """Attach commands to a breakpoint, replayed at each hit — `.commands <n>`, end with `end`.
2034
+ """Attach commands to a breakpoint, replayed at each hit: `.commands <n>`, end with `end`.
1996
2035
 
1997
2036
  Enter one command per line; `end` finishes. A leading `silent` suppresses
1998
- the stop banner; a resuming command (`.continue`/…) makes the breakpoint
2037
+ the stop banner; a resuming command (`.continue`/...) makes the breakpoint
1999
2038
  run the commands and carry on without prompting. Bare list clears them.
2000
2039
  """
2001
2040
  if not self._require_controller():
@@ -2031,7 +2070,7 @@ class ConsoleInterpreter(BaseInterpreter):
2031
2070
 
2032
2071
  @dot_command("catch", group="Debugger")
2033
2072
  def _catch(self, arg: str) -> None:
2034
- """Set exception breakpoints — `.catch uncaught|all|test|suite|off`, or bare to show."""
2073
+ """Set exception breakpoints: `.catch uncaught|all|test|suite|off`, or bare to show."""
2035
2074
  if not self._require_controller():
2036
2075
  return
2037
2076
  controller = self._controller
@@ -2057,12 +2096,12 @@ class ConsoleInterpreter(BaseInterpreter):
2057
2096
 
2058
2097
  @dot_command("debug", group="Debugger")
2059
2098
  def _debug(self, arg: str) -> None:
2060
- """Attach or detach the debugger — `.debug on|off`, or bare to show state.
2099
+ """Attach or detach the debugger: `.debug on|off`, or bare to show state.
2061
2100
 
2062
2101
  When **attached** (`.debug on`) breakpoints, an embedded `Breakpoint`
2063
2102
  keyword, and the armed exception breaks (`.catch`) pause a keyword you
2064
2103
  run into the `(rdb)` prompt. When **detached** (`.debug off`, the default
2065
- for `robotcode repl`) nothing pauses — a failing keyword just prints its
2104
+ for `robotcode repl`) nothing pauses: a failing keyword just prints its
2066
2105
  error and you stay at the prompt. Detaching keeps your breakpoints and
2067
2106
  `.catch` filters intact, so `.debug on` resumes with the same setup.
2068
2107
  """
@@ -353,7 +353,7 @@ def _load(
353
353
 
354
354
 
355
355
  def _page(library: LibraryDoc) -> str:
356
- return library.to_markdown(only_doc=False, header_level=0, link_resolver=anchor_link_resolver)
356
+ return library.to_markdown(only_doc=False, header_level=0, link_resolver=anchor_link_resolver, ascii_only=True)
357
357
 
358
358
 
359
359
  def _check_output(app: Application, output: Optional[Path]) -> Optional[Path]:
@@ -392,7 +392,7 @@ def _keyword_entries(library: LibraryDoc, page: str, keywords: List[KeywordDoc])
392
392
  KeywordEntry(
393
393
  name=kw.name,
394
394
  anchor=anchors.get(id(kw), ""),
395
- args=kw.parameter_signature().replace("‍", ""),
395
+ args=kw.parameter_signature(ascii_only=True),
396
396
  short_doc=_one_line(kw.format_text(getshortdoc(kw.doc))),
397
397
  tags=list(kw.tags),
398
398
  doc=kw.format_text(kw.doc),
@@ -528,8 +528,8 @@ def keywords(
528
528
  return
529
529
 
530
530
  lines = [
531
- f"- **{kw.name}** `{kw.parameter_signature().replace(chr(0x200D), '')}`"
532
- + (f" — {short_doc}" if (short_doc := _one_line(kw.format_text(getshortdoc(kw.doc)))) else "")
531
+ f"- **{kw.name}** `{kw.parameter_signature(ascii_only=True)}`"
532
+ + (f" - {short_doc}" if (short_doc := _one_line(kw.format_text(getshortdoc(kw.doc)))) else "")
533
533
  for kw in selected
534
534
  ]
535
535
  _write_markdown(app, "\n".join([_title(library), "", *(lines or ["_(no keyword matches)_"])]) + "\n", output)
@@ -591,7 +591,7 @@ def keyword(
591
591
  for argument in kw.arguments:
592
592
  for type_doc in library.get_types_for_argument(argument):
593
593
  type_docs.setdefault(type_doc.name, type_doc)
594
- parts = [kw.to_markdown() for kw in selected]
594
+ parts = [kw.to_markdown(ascii_only=True) for kw in selected]
595
595
  parts.extend(type_docs[t].to_markdown(header_level=1) for t in sorted(type_docs, key=lambda t: (t.lower(), t)))
596
596
  # One document: a label that two parts define for other URLs would link both to the first URL.
597
597
  labels: Dict[str, str] = {}
@@ -1 +0,0 @@
1
- __version__ = "2.9.0-dev.124"