robotcode-plugin 2.6.2__tar.gz → 2.8.0.dev548__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.
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/.gitignore +4 -1
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/PKG-INFO +3 -2
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/pyproject.toml +1 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/__init__.py +22 -2
- robotcode_plugin-2.8.0.dev548/src/robotcode/plugin/__version__.py +1 -0
- robotcode_plugin-2.8.0.dev548/src/robotcode/plugin/click_helper/exit_codes.py +21 -0
- robotcode_plugin-2.8.0.dev548/src/robotcode/plugin/click_helper/wrappable.py +26 -0
- robotcode_plugin-2.6.2/src/robotcode/plugin/__version__.py +0 -1
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/README.md +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/_agent_detection.py +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/click_helper/aliases.py +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/click_helper/options.py +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/click_helper/types.py +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/manager.py +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/py.typed +0 -0
- {robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/specs.py +0 -0
|
@@ -279,6 +279,9 @@ dist
|
|
|
279
279
|
# vuepress build output
|
|
280
280
|
.vuepress/dist
|
|
281
281
|
|
|
282
|
+
# Astro (documentation site)
|
|
283
|
+
docs/.astro/
|
|
284
|
+
|
|
282
285
|
# Serverless directories
|
|
283
286
|
.serverless/
|
|
284
287
|
|
|
@@ -339,7 +342,7 @@ bundled/libs
|
|
|
339
342
|
# .agents
|
|
340
343
|
.agents/
|
|
341
344
|
skills-lock.json
|
|
342
|
-
|
|
345
|
+
#.claude
|
|
343
346
|
|
|
344
347
|
# sarif files
|
|
345
348
|
/**/*.sarif.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: robotcode-plugin
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0-dev.548
|
|
4
4
|
Summary: Some classes for RobotCode plugin management
|
|
5
5
|
Project-URL: Donate, https://opencollective.com/robotcode
|
|
6
6
|
Project-URL: Documentation, https://github.com/robotcodedev/robotcode#readme
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
23
24
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
24
25
|
Classifier: Topic :: Utilities
|
|
@@ -18,6 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Programming Language :: Python :: 3.12",
|
|
19
19
|
"Programming Language :: Python :: 3.13",
|
|
20
20
|
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Programming Language :: Python :: 3.15",
|
|
21
22
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
22
23
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
23
24
|
"Operating System :: OS Independent",
|
|
@@ -136,6 +136,7 @@ def _get_deep_markdown_cls() -> "type[Markdown]":
|
|
|
136
136
|
TableHeaderElement,
|
|
137
137
|
TableRowElement,
|
|
138
138
|
)
|
|
139
|
+
from rich.segment import Segment
|
|
139
140
|
from rich.text import Text
|
|
140
141
|
|
|
141
142
|
class LeftHeading(Heading):
|
|
@@ -196,6 +197,25 @@ def _get_deep_markdown_cls() -> "type[Markdown]":
|
|
|
196
197
|
parser.options.maxNesting = 1000
|
|
197
198
|
self.parsed = parser.parse(markup)
|
|
198
199
|
|
|
200
|
+
def __rich_console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
|
|
201
|
+
# rich pads every line with spaces to the full console width. A
|
|
202
|
+
# pager that reserves columns (bat's line numbers and grid) wraps
|
|
203
|
+
# those full-width lines, and every wrapped remainder shows up
|
|
204
|
+
# as an empty line. Drop the padding unless it carries a
|
|
205
|
+
# background colour (code blocks draw a box with it).
|
|
206
|
+
for line in Segment.split_lines(cast(Iterable[Segment], super().__rich_console__(console, options))):
|
|
207
|
+
while line and not line[-1].control:
|
|
208
|
+
text, style, _ = line[-1]
|
|
209
|
+
if style is not None and style.bgcolor is not None:
|
|
210
|
+
break
|
|
211
|
+
text = text.rstrip(" ")
|
|
212
|
+
if text:
|
|
213
|
+
line[-1] = Segment(text, style)
|
|
214
|
+
break
|
|
215
|
+
line.pop()
|
|
216
|
+
yield from line
|
|
217
|
+
yield Segment.line()
|
|
218
|
+
|
|
199
219
|
_deep_markdown_cls = DeepMarkdown
|
|
200
220
|
return DeepMarkdown
|
|
201
221
|
|
|
@@ -341,7 +361,7 @@ class Application:
|
|
|
341
361
|
if dataclasses.is_dataclass(data)
|
|
342
362
|
else data
|
|
343
363
|
if isinstance(data, dict)
|
|
344
|
-
else {data: data}
|
|
364
|
+
else {"data": data}
|
|
345
365
|
)
|
|
346
366
|
|
|
347
367
|
if text is None:
|
|
@@ -349,7 +369,7 @@ class Application:
|
|
|
349
369
|
text = as_json(
|
|
350
370
|
data,
|
|
351
371
|
indent=format == OutputFormat.JSON_INDENT,
|
|
352
|
-
compact=format == OutputFormat.
|
|
372
|
+
compact=format == OutputFormat.JSON,
|
|
353
373
|
)
|
|
354
374
|
else:
|
|
355
375
|
text = str(data)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.8.0-dev.548"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
_ROBOT_EXIT_CODES_ATTR = "__robotcode_robot_exit_codes__"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def robot_exit_codes(cmd: click.Command) -> click.Command:
|
|
7
|
+
"""Mark a CLI command that passes on the exit code of a Robot Framework tool.
|
|
8
|
+
|
|
9
|
+
Such a command answers with Robot Framework's exit codes, like the `wrappable`
|
|
10
|
+
commands that run Robot Framework, so an error robotcode reports itself for it
|
|
11
|
+
exits with Robot Framework's 252 instead of Click's 1 or 2. Mark the commands
|
|
12
|
+
that pass on a tool's exit code without running tests - rebot, libdoc,
|
|
13
|
+
testdoc; `wrappable` commands are covered already.
|
|
14
|
+
"""
|
|
15
|
+
setattr(cmd, _ROBOT_EXIT_CODES_ATTR, True)
|
|
16
|
+
return cmd
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def has_robot_exit_codes(cmd: click.Command) -> bool:
|
|
20
|
+
"""Return whether `cmd` was marked with :func:`robot_exit_codes`."""
|
|
21
|
+
return bool(getattr(cmd, _ROBOT_EXIT_CODES_ATTR, False))
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
# Set in the environment once a wrapper has been applied to the process tree.
|
|
4
|
+
# Prevents infinite re-exec recursion and lets an outer layer (e.g. the VS Code
|
|
5
|
+
# debug launcher applying its own wrapper) suppress the CLI/profile re-exec.
|
|
6
|
+
WRAPPER_APPLIED_ENV = "ROBOTCODE_WRAPPER_APPLIED"
|
|
7
|
+
|
|
8
|
+
_WRAPPABLE_ATTR = "__robotcode_wrappable__"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def wrappable(cmd: click.Command) -> click.Command:
|
|
12
|
+
"""Mark a CLI command as *wrappable*.
|
|
13
|
+
|
|
14
|
+
When a `wrapper` (session) command is configured, a wrappable command is
|
|
15
|
+
re-executed through it, because it executes Robot Framework (and may, for
|
|
16
|
+
example, need to run inside a specific X11/Wayland session). Commands that
|
|
17
|
+
do not execute Robot Framework - language server, discovery, libdoc, … -
|
|
18
|
+
must NOT be marked.
|
|
19
|
+
"""
|
|
20
|
+
setattr(cmd, _WRAPPABLE_ATTR, True)
|
|
21
|
+
return cmd
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def is_wrappable(cmd: click.Command) -> bool:
|
|
25
|
+
"""Return whether `cmd` was marked with :func:`wrappable`."""
|
|
26
|
+
return bool(getattr(cmd, _WRAPPABLE_ATTR, False))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.6.2"
|
|
File without changes
|
{robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/_agent_detection.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotcode_plugin-2.6.2 → robotcode_plugin-2.8.0.dev548}/src/robotcode/plugin/click_helper/types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|