robotcode 2.7.0__py3-none-any.whl → 2.8.0.dev631__py3-none-any.whl

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.
robotcode/cli/__init__.py CHANGED
@@ -6,7 +6,7 @@ import shlex
6
6
  import subprocess
7
7
  import sys
8
8
  from pathlib import Path
9
- from typing import Any, List, Literal, Optional
9
+ from typing import IO, Any, List, Literal, Optional
10
10
 
11
11
  import click
12
12
 
@@ -20,6 +20,7 @@ from robotcode.plugin import (
20
20
  )
21
21
  from robotcode.plugin._agent_detection import is_running_in_ai_agent
22
22
  from robotcode.plugin.click_helper.aliases import AliasedGroup
23
+ from robotcode.plugin.click_helper.exit_codes import has_robot_exit_codes
23
24
  from robotcode.plugin.click_helper.types import EnumChoice
24
25
  from robotcode.plugin.click_helper.wrappable import WRAPPER_APPLIED_ENV, is_wrappable
25
26
  from robotcode.plugin.manager import PluginManager
@@ -94,11 +95,14 @@ def _maybe_reexec_under_wrapper(
94
95
  verbose_callback=app.verbose,
95
96
  )
96
97
  # `evaluated_with_env` also applies the profile's `env` to `os.environ`,
97
- # so the wrapper command can rely on it.
98
+ # so the wrapper command can rely on it. Profile errors are swallowed
99
+ # here: the command loads the config again and reports them, so they
100
+ # show up once. (Without a callback they would raise, and an unknown
101
+ # profile would make us skip the wrapper of a valid one.)
98
102
  profile = (
99
103
  load_robot_config_from_path(*config_files, verbose_callback=app.verbose)
100
- .combine_profiles(*(app.config.profiles or []), verbose_callback=app.verbose, error_callback=app.error)
101
- .evaluated_with_env(verbose_callback=app.verbose, error_callback=app.error)
104
+ .combine_profiles(*(app.config.profiles or []), verbose_callback=app.verbose, error_callback=lambda _: None)
105
+ .evaluated_with_env(verbose_callback=app.verbose, error_callback=lambda _: None)
102
106
  )
103
107
  profile_wrapper = profile.wrapper
104
108
  except Exception as e:
@@ -117,6 +121,13 @@ def _maybe_reexec_under_wrapper(
117
121
  else:
118
122
  return
119
123
 
124
+ # A dry run must not start the wrapper: it would set up and tear down the
125
+ # real environment. Show it instead; the command itself then prints its own
126
+ # dry-run output.
127
+ if app.config.dry:
128
+ app.echo(f"Dry run, not executing the wrapper. Would run robotcode under: {' '.join(wrapper)}")
129
+ return
130
+
120
131
  # Rebuild the invocation the way this process was actually started, so the
121
132
  # re-exec finds robotcode even when it runs from a bundled path (VS Code) and
122
133
  # is not installed in the interpreter. `launcher_script` is set only when we
@@ -143,8 +154,52 @@ def _maybe_reexec_under_wrapper(
143
154
  raise click.ClickException(f"Failed to execute wrapper command {wrapper!r}: {e}") from e
144
155
 
145
156
 
157
+ class RobotDataError(click.ClickException):
158
+ """An error robotcode reports itself for a command that passes on Robot Framework's
159
+ exit codes.
160
+
161
+ Shows the original error unchanged, but exits with Robot Framework's code for invalid
162
+ data or command line options instead of Click's 1 or 2.
163
+ """
164
+
165
+ exit_code = 252
166
+
167
+ def __init__(self, error: click.ClickException) -> None:
168
+ super().__init__(error.message)
169
+ self.error = error
170
+
171
+ def show(self, file: Optional[IO[Any]] = None) -> None:
172
+ self.error.show(file)
173
+
174
+
175
+ class RobotCodeGroup(AliasedGroup):
176
+ """The root command group.
177
+
178
+ Commands that run Robot Framework (`wrappable`) or pass on the exit code of a Robot
179
+ Framework tool (`robot_exit_codes`) answer with its exit codes, where 1-250 counts the
180
+ failed tests. An error robotcode reports itself for such a command - a Click error with
181
+ exit code 1 or 2, such as a broken configuration, a wrapper that doesn't start or an
182
+ invalid option - exits with Robot Framework's 252 instead. Robot Framework's own exit
183
+ codes never arrive as Click errors, so they pass through unchanged, and so does any
184
+ other code.
185
+ """
186
+
187
+ def invoke(self, ctx: click.Context) -> Any:
188
+ try:
189
+ return super().invoke(ctx)
190
+ except click.ClickException as e:
191
+ if e.exit_code in (1, 2) and self._passes_on_robot_exit_codes(ctx):
192
+ raise RobotDataError(e) from e
193
+ raise
194
+
195
+ def _passes_on_robot_exit_codes(self, ctx: click.Context) -> bool:
196
+ name = ctx.invoked_subcommand
197
+ cmd = self.get_command(ctx, name) if name else None
198
+ return cmd is not None and (is_wrappable(cmd) or has_robot_exit_codes(cmd))
199
+
200
+
146
201
  @click.group(
147
- cls=AliasedGroup,
202
+ cls=RobotCodeGroup,
148
203
  context_settings={"auto_envvar_prefix": "ROBOTCODE"},
149
204
  invoke_without_command=False,
150
205
  )
@@ -205,8 +260,9 @@ def _maybe_reexec_under_wrapper(
205
260
  "color",
206
261
  default=None,
207
262
  help=(
208
- "Force or disable colored output. Default (no flag): auto-detect — colors only when stdout is a TTY,"
209
- " disabled if `NO_COLOR` is set, forced if `FORCE_COLOR` is set."
263
+ "Enable or disable colored output. Color codes are written only to a terminal; set `FORCE_COLOR` to get"
264
+ " them in a pipe. Default (no flag): auto-detect — colors only when stdout is a TTY, disabled if `NO_COLOR`"
265
+ " is set, forced if `FORCE_COLOR` is set."
210
266
  ),
211
267
  show_envvar=True,
212
268
  )
@@ -215,7 +271,8 @@ def _maybe_reexec_under_wrapper(
215
271
  "pager",
216
272
  default=None,
217
273
  help=(
218
- "Force or disable the pager. Default (no flag): auto-page when the rendered output exceeds the terminal height."
274
+ "Force or disable the pager on a terminal; no pager starts when stdout isn't a TTY. Default (no flag):"
275
+ " auto-page when the rendered output exceeds the terminal height."
219
276
  ),
220
277
  show_envvar=True,
221
278
  )
@@ -1 +1 @@
1
- __version__ = "2.7.0"
1
+ __version__ = "2.8.0-dev.631"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: robotcode
3
- Version: 2.7.0
3
+ Version: 2.8.0-dev.631
4
4
  Summary: Command line interface for RobotCode
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -23,6 +23,7 @@ Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: 3.13
25
25
  Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Programming Language :: Python :: 3.15
26
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
28
  Classifier: Topic :: Software Development :: Debuggers
28
29
  Classifier: Topic :: Software Development :: Quality Assurance
@@ -33,35 +34,35 @@ Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
33
34
  Classifier: Topic :: Utilities
34
35
  Classifier: Typing :: Typed
35
36
  Requires-Python: >=3.10
36
- Requires-Dist: robotcode-core==2.7.0
37
- Requires-Dist: robotcode-plugin==2.7.0
38
- Requires-Dist: robotcode-robot==2.7.0
37
+ Requires-Dist: robotcode-core==2.8.0-dev.631
38
+ Requires-Dist: robotcode-plugin==2.8.0-dev.631
39
+ Requires-Dist: robotcode-robot==2.8.0-dev.631
39
40
  Provides-Extra: all
40
41
  Requires-Dist: docutils; extra == 'all'
41
42
  Requires-Dist: pyyaml>=5.4; extra == 'all'
42
- Requires-Dist: robotcode-analyze==2.7.0; extra == 'all'
43
- Requires-Dist: robotcode-debugger==2.7.0; extra == 'all'
44
- Requires-Dist: robotcode-language-server==2.7.0; extra == 'all'
45
- Requires-Dist: robotcode-repl-server==2.7.0; extra == 'all'
46
- Requires-Dist: robotcode-repl==2.7.0; extra == 'all'
47
- Requires-Dist: robotcode-runner==2.7.0; extra == 'all'
43
+ Requires-Dist: robotcode-analyze==2.8.0-dev.631; extra == 'all'
44
+ Requires-Dist: robotcode-debugger==2.8.0-dev.631; extra == 'all'
45
+ Requires-Dist: robotcode-language-server==2.8.0-dev.631; extra == 'all'
46
+ Requires-Dist: robotcode-repl-server==2.8.0-dev.631; extra == 'all'
47
+ Requires-Dist: robotcode-repl==2.8.0-dev.631; extra == 'all'
48
+ Requires-Dist: robotcode-runner==2.8.0-dev.631; extra == 'all'
48
49
  Requires-Dist: robotframework-robocop>=6.0.0; extra == 'all'
49
50
  Provides-Extra: analyze
50
- Requires-Dist: robotcode-analyze==2.7.0; extra == 'analyze'
51
+ Requires-Dist: robotcode-analyze==2.8.0-dev.631; extra == 'analyze'
51
52
  Provides-Extra: debugger
52
- Requires-Dist: robotcode-debugger==2.7.0; extra == 'debugger'
53
+ Requires-Dist: robotcode-debugger==2.8.0-dev.631; extra == 'debugger'
53
54
  Provides-Extra: languageserver
54
- Requires-Dist: robotcode-language-server==2.7.0; extra == 'languageserver'
55
+ Requires-Dist: robotcode-language-server==2.8.0-dev.631; extra == 'languageserver'
55
56
  Provides-Extra: lint
56
57
  Requires-Dist: robotframework-robocop>=2.0.0; extra == 'lint'
57
58
  Provides-Extra: repl
58
- Requires-Dist: robotcode-repl==2.7.0; extra == 'repl'
59
+ Requires-Dist: robotcode-repl==2.8.0-dev.631; extra == 'repl'
59
60
  Provides-Extra: replserver
60
- Requires-Dist: robotcode-repl-server==2.7.0; extra == 'replserver'
61
+ Requires-Dist: robotcode-repl-server==2.8.0-dev.631; extra == 'replserver'
61
62
  Provides-Extra: rest
62
63
  Requires-Dist: docutils; extra == 'rest'
63
64
  Provides-Extra: runner
64
- Requires-Dist: robotcode-runner==2.7.0; extra == 'runner'
65
+ Requires-Dist: robotcode-runner==2.8.0-dev.631; extra == 'runner'
65
66
  Provides-Extra: yaml
66
67
  Requires-Dist: pyyaml>=5.4; extra == 'yaml'
67
68
  Description-Content-Type: text/markdown
@@ -69,7 +70,7 @@ Description-Content-Type: text/markdown
69
70
  # RobotCode - The Ultimate Robot Framework Toolset
70
71
 
71
72
  [![License](https://img.shields.io/github/license/robotcodedev/robotcode?style=flat&logo=apache)](https://github.com/robotcodedev/robotcode/blob/main/LICENSE)
72
- [![Build Status](https://img.shields.io/github/actions/workflow/status/robotcodedev/robotcode/build-test-package-publish.yml?branch=main&style=flat&logo=github)](https://github.com/robotcodedev/robotcode/actions?query=workflow:build_test_package_publish)
73
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/robotcodedev/robotcode/build-test-package.yml?branch=main&style=flat&logo=github)](https://github.com/robotcodedev/robotcode/actions/workflows/build-test-package.yml)
73
74
  [![VS Code Marketplace](https://img.shields.io/visual-studio-marketplace/v/d-biehl.robotcode?style=flat&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
74
75
  [![Installs](https://img.shields.io/visual-studio-marketplace/i/d-biehl.robotcode?style=flat)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
75
76
  [![JetBrains Marketplace](https://img.shields.io/jetbrains/plugin/v/26216.svg)](https://plugins.jetbrains.com/plugin/26216)
@@ -131,9 +132,22 @@ For the complete feature reference, see the [official documentation](https://rob
131
132
  - Python 3.10 or newer
132
133
  - Robot Framework 5.0 or newer
133
134
 
135
+ **Supported combinations:** each Robot Framework version is supported with the Python versions that it officially supports itself:
136
+
137
+ | Robot Framework | Python |
138
+ |---|---|
139
+ | 5.0 | 3.10 |
140
+ | 6.0 | 3.10 – 3.11 |
141
+ | 6.1, 7.0 | 3.10 – 3.12 |
142
+ | 7.1, 7.2 | 3.10 – 3.13 |
143
+ | 7.3, 7.4 | 3.10 – 3.14 |
144
+ | 7.5 | 3.10 – 3.15 |
145
+
146
+ RobotCode's CI tests only these combinations, to keep the effort low. Other combinations may work, but using them is your own responsibility. For example, Robot Framework versions before 7.5 may not work with Python 3.15.
147
+
134
148
  **Editor / IDE — any LSP-capable editor works.** For the dedicated extensions you need one of:
135
- - Visual Studio Code 1.108.0 or newer
136
- - PyCharm / IntelliJ IDEA 2025.3 or newer
149
+ - Visual Studio Code 1.127.0 or newer
150
+ - PyCharm / IntelliJ IDEA 2026.1 or newer
137
151
 
138
152
  Other editors (Neovim, Sublime Text, Helix, Emacs, …) connect to the language server via the `languageserver` extra from PyPI — see [Command Line and Other Editors](#command-line-and-other-editors) below.
139
153
 
@@ -143,7 +157,7 @@ Other editors (Neovim, Sublime Text, Helix, Emacs, …) connect to the language
143
157
  ### Visual Studio Code
144
158
 
145
159
  1. **Install the RobotCode Extension** from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode).
146
- 2. **Continue with the [Getting Started Guide](https://robotcode.io/02_get_started/)** for setup, your first `robot.toml`, and running your first test.
160
+ 2. **Continue with the [Getting Started Guide](https://robotcode.io/getting-started/)** for setup, your first `robot.toml`, and running your first test.
147
161
 
148
162
  **Extensions:**
149
163
  RobotCode declares dependencies on the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) and [Python Debugger](https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy) extensions so VS Code installs them when required. Additional extensions may be needed depending on your project.
@@ -157,7 +171,7 @@ RobotCode declares dependencies on the [Python](https://marketplace.visualstudio
157
171
  - **[JetBrains Marketplace](https://plugins.jetbrains.com/plugin/26216):** click <kbd>Install to ...</kbd> if your IDE is running.
158
172
  - **Manual:** download the [latest release](https://github.com/robotcodedev/robotcode/releases/latest) and use <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>.
159
173
 
160
- 2. **Continue with the [Getting Started Guide](https://robotcode.io/02_get_started/)** for setup, your first `robot.toml`, and running your first test.
174
+ 2. **Continue with the [Getting Started Guide](https://robotcode.io/getting-started/)** for setup, your first `robot.toml`, and running your first test.
161
175
 
162
176
  **Plugins:**
163
177
  RobotCode declares a dependency on [LSP4IJ](https://plugins.jetbrains.com/plugin/23257) so your IDE installs it automatically. Additional plugins may be required depending on your project needs.
@@ -168,10 +182,10 @@ RobotCode declares a dependency on [LSP4IJ](https://plugins.jetbrains.com/plugin
168
182
  For CI pipelines, the command line, or LSP-compatible editors like Neovim, Sublime Text, or Helix, install RobotCode from PyPI. The base `robotcode` package is only the CLI core; the actual commands live in extras such as `runner`, `analyze`, `debugger`, `languageserver`, and `repl`:
169
183
 
170
184
  ```bash
171
- pip install robotcode[runner,analyze]
185
+ pip install "robotcode[runner,analyze]"
172
186
  ```
173
187
 
174
- Pick the extras that match your use case — see the [CLI reference](https://robotcode.io/03_reference/cli) for the available packages and how to install them.
188
+ Pick the extras that match your use case — see the [CLI reference](https://robotcode.io/reference/cli/) for the available packages and how to install them.
175
189
 
176
190
 
177
191
  ## Documentation
@@ -179,10 +193,10 @@ Pick the extras that match your use case — see the [CLI reference](https://rob
179
193
  For detailed instructions, visit our **[official documentation](https://robotcode.io)**. Additional resources:
180
194
 
181
195
  - **[Q&A](https://github.com/robotcodedev/robotcode/discussions/categories/q-a):** Answers to common questions about RobotCode.
182
- - **[Tips & Tricks](https://robotcode.io/04_tip_and_tricks/):** Common pitfalls, editor customization, and setup recipes.
183
- - **[Command Line Tools Reference](https://robotcode.io/03_reference/cli):** Comprehensive documentation on using RobotCode's CLI tools.
196
+ - **[Guides](https://robotcode.io/guides/):** How to use RobotCode's commands and set up projects, plus common pitfalls and editor customization.
197
+ - **[Command Line Tools Reference](https://robotcode.io/reference/cli/):** Comprehensive documentation on using RobotCode's CLI tools.
184
198
  - **[Changelog](https://github.com/robotcodedev/robotcode/blob/main/CHANGELOG.md):** Track changes, updates, and new features in each release.
185
- - **[Support & Contribute](https://robotcode.io/05_contributing/):** Ways to back the project — financial, code, feedback.
199
+ - **[Support & Contribute](https://robotcode.io/contributing/):** Ways to back the project — financial, code, feedback.
186
200
 
187
201
 
188
202
  ## Sponsor RobotCode
@@ -0,0 +1,12 @@
1
+ robotcode/cli/__init__.py,sha256=kdPYL7SnMNmVf6jZ0p7xAvHIFKo5aUxWMt9TwLcd1Sw,18158
2
+ robotcode/cli/__main__.py,sha256=hX3nwROMTnsYGT1KS0rXUYrslu9sFzctYdAh66Rcckw,153
3
+ robotcode/cli/__version__.py,sha256=9SGjqX5uvERIavT5Cjgw0TSLgQ-nKCFaQ13-E6K7MDA,30
4
+ robotcode/cli/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
5
+ robotcode/cli/commands/__init__.py,sha256=XJHRt_YwMO2Ni2EfL2aj4jkJXMVG6NGFTpzvSVgIRnQ,92
6
+ robotcode/cli/commands/config.py,sha256=0Jmf7HDIo7IIaOMU9M_bYi7PdHAfcae6x3SW93NA3EA,10481
7
+ robotcode/cli/commands/profiles.py,sha256=5H9lvSVCMggWXf0IH54QtgDgqupEEvpcUrEsTZvZsNM,6127
8
+ robotcode-2.8.0.dev631.dist-info/METADATA,sha256=Rtnj2zN_ogJv2vwpnQ1s9PMp51A2HD8hYyts24ad2sA,15310
9
+ robotcode-2.8.0.dev631.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
10
+ robotcode-2.8.0.dev631.dist-info/entry_points.txt,sha256=Pb4DKVVdJb5PboVl48njwk3DkKQHBJOL1A8KkpemqA8,58
11
+ robotcode-2.8.0.dev631.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
12
+ robotcode-2.8.0.dev631.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,12 +0,0 @@
1
- robotcode/cli/__init__.py,sha256=qvIUqcHP8K1FNyu3whFDe6M_Wyeo_SKCqwBxtPeQfy0,15608
2
- robotcode/cli/__main__.py,sha256=hX3nwROMTnsYGT1KS0rXUYrslu9sFzctYdAh66Rcckw,153
3
- robotcode/cli/__version__.py,sha256=EtKWW0Hnl5oWglRNH0HZigvcDT2FEs58ek8buJdwW1E,22
4
- robotcode/cli/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
5
- robotcode/cli/commands/__init__.py,sha256=XJHRt_YwMO2Ni2EfL2aj4jkJXMVG6NGFTpzvSVgIRnQ,92
6
- robotcode/cli/commands/config.py,sha256=0Jmf7HDIo7IIaOMU9M_bYi7PdHAfcae6x3SW93NA3EA,10481
7
- robotcode/cli/commands/profiles.py,sha256=5H9lvSVCMggWXf0IH54QtgDgqupEEvpcUrEsTZvZsNM,6127
8
- robotcode-2.7.0.dist-info/METADATA,sha256=nJWf0wXHOE5LlTfA-cTYK3NsBzv6tGYnOfKj8XZSt9M,14582
9
- robotcode-2.7.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
10
- robotcode-2.7.0.dist-info/entry_points.txt,sha256=Pb4DKVVdJb5PboVl48njwk3DkKQHBJOL1A8KkpemqA8,58
11
- robotcode-2.7.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
12
- robotcode-2.7.0.dist-info/RECORD,,