robotcode 0.91.0__tar.gz → 0.92.0__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-0.91.0 → robotcode-0.92.0}/CHANGELOG.md +25 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/PKG-INFO +12 -12
- {robotcode-0.91.0 → robotcode-0.92.0}/hatch.toml +4 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/pyproject.toml +16 -11
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/__init__.py +2 -3
- robotcode-0.92.0/src/robotcode/cli/__version__.py +1 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/commands/config.py +57 -47
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/commands/profiles.py +2 -2
- robotcode-0.91.0/src/robotcode/cli/__version__.py +0 -1
- {robotcode-0.91.0 → robotcode-0.92.0}/.gitignore +0 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/LICENSE.txt +0 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/README.md +0 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/__main__.py +0 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/commands/__init__.py +0 -0
- {robotcode-0.91.0 → robotcode-0.92.0}/src/robotcode/cli/py.typed +0 -0
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
4
4
|
|
5
|
+
## [0.92.0](https://github.com/robotcodedev/robotcode/compare/v0.91.0..v0.92.0) - 2024-10-01
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
- **analyze:** Allow shortforms of `warning` and `information`, `warn` and `info` in diagnostic modifiers ([f226091](https://github.com/robotcodedev/robotcode/commit/f226091e59b0fff2858de7311d542b903c5bf2d3))
|
10
|
+
- **config:** Added posibility to allow different tool configs to robot.toml.json schema ([ee256ce](https://github.com/robotcodedev/robotcode/commit/ee256ce38b39ae67ae107bb5fffa5dba8d8d7db4))
|
11
|
+
- **robot.toml:** Introduce new settings for analysis in robot.toml ([fa37dba](https://github.com/robotcodedev/robotcode/commit/fa37dba7ccfebf9d221b6985a12e460e27209f64))
|
12
|
+
- **vscode:** Introduce setting for modifing the diagnostics severity ([5cca59f](https://github.com/robotcodedev/robotcode/commit/5cca59fd364cb1c6a8a8c6f0e63a956bca88e366))
|
13
|
+
|
14
|
+
With these settings, you can override the default configuration for all diagnostic messages. By combining file, block, and line diagnostic modifiers, you can precisely control how specific errors are displayed.
|
15
|
+
|
16
|
+
- **`robotcode.analysis.diagnosticModifiers.ignore`**: Suppresses specific diagnostics from being displayed. You can specify one or more error codes, like `MultipleKeywords` or `[multiple-keywords, VariableNotFound]`. Use `*` to ignore all errors and then maybe add specific error codes to other modifiers, such as `information`, to selectively show them.
|
17
|
+
- **`robotcode.analysis.diagnosticModifiers.error`**: Treats selected diagnostics as errors.
|
18
|
+
- **`robotcode.analysis.diagnosticModifiers.warning`**: Displays chosen diagnostics as warnings.
|
19
|
+
- **`robotcode.analysis.diagnosticModifiers.information`**: Shows specified diagnostics as information
|
20
|
+
- **`robotcode.analysis.diagnosticModifiers.hint`**: Marks selected diagnostics as hints
|
21
|
+
|
22
|
+
These settings allow you to tailor the diagnostic outputs to meet the specific needs of your project.
|
23
|
+
|
24
|
+
- Introduce `Select Python Environment` command and deprecate `robotcode.python` ([be0573d](https://github.com/robotcodedev/robotcode/commit/be0573ddcfaf1100de8058bc6383a013eaf4ee88))
|
25
|
+
|
26
|
+
|
27
|
+
See [here](https://github.com/microsoft/vscode-python/wiki/Setting-descriptions#pythondefaultinterpreterpath) for an explanation.
|
28
|
+
|
29
|
+
|
5
30
|
## [0.91.0](https://github.com/robotcodedev/robotcode/compare/v0.90.0..v0.91.0) - 2024-09-27
|
6
31
|
|
7
32
|
### Bug Fixes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: robotcode
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.92.0
|
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
|
@@ -33,33 +33,33 @@ Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
|
|
33
33
|
Classifier: Topic :: Utilities
|
34
34
|
Classifier: Typing :: Typed
|
35
35
|
Requires-Python: >=3.8
|
36
|
-
Requires-Dist: robotcode-core==0.
|
37
|
-
Requires-Dist: robotcode-plugin==0.
|
38
|
-
Requires-Dist: robotcode-robot==0.
|
36
|
+
Requires-Dist: robotcode-core==0.92.0
|
37
|
+
Requires-Dist: robotcode-plugin==0.92.0
|
38
|
+
Requires-Dist: robotcode-robot==0.92.0
|
39
39
|
Provides-Extra: all
|
40
40
|
Requires-Dist: docutils; extra == 'all'
|
41
41
|
Requires-Dist: pyyaml>=5.4; extra == 'all'
|
42
42
|
Requires-Dist: rich; extra == 'all'
|
43
|
-
Requires-Dist: robotcode-analyze==0.
|
44
|
-
Requires-Dist: robotcode-debugger==0.
|
45
|
-
Requires-Dist: robotcode-language-server==0.
|
46
|
-
Requires-Dist: robotcode-runner==0.
|
43
|
+
Requires-Dist: robotcode-analyze==0.92.0; extra == 'all'
|
44
|
+
Requires-Dist: robotcode-debugger==0.92.0; extra == 'all'
|
45
|
+
Requires-Dist: robotcode-language-server==0.92.0; extra == 'all'
|
46
|
+
Requires-Dist: robotcode-runner==0.92.0; extra == 'all'
|
47
47
|
Requires-Dist: robotframework-robocop>=2.0.0; extra == 'all'
|
48
48
|
Requires-Dist: robotframework-tidy>=2.0.0; extra == 'all'
|
49
49
|
Provides-Extra: analyze
|
50
|
-
Requires-Dist: robotcode-analyze==0.
|
50
|
+
Requires-Dist: robotcode-analyze==0.92.0; extra == 'analyze'
|
51
51
|
Provides-Extra: colored
|
52
52
|
Requires-Dist: rich; extra == 'colored'
|
53
53
|
Provides-Extra: debugger
|
54
|
-
Requires-Dist: robotcode-debugger==0.
|
54
|
+
Requires-Dist: robotcode-debugger==0.92.0; extra == 'debugger'
|
55
55
|
Provides-Extra: languageserver
|
56
|
-
Requires-Dist: robotcode-language-server==0.
|
56
|
+
Requires-Dist: robotcode-language-server==0.92.0; extra == 'languageserver'
|
57
57
|
Provides-Extra: lint
|
58
58
|
Requires-Dist: robotframework-robocop>=2.0.0; extra == 'lint'
|
59
59
|
Provides-Extra: rest
|
60
60
|
Requires-Dist: docutils; extra == 'rest'
|
61
61
|
Provides-Extra: runner
|
62
|
-
Requires-Dist: robotcode-runner==0.
|
62
|
+
Requires-Dist: robotcode-runner==0.92.0; extra == 'runner'
|
63
63
|
Provides-Extra: tidy
|
64
64
|
Requires-Dist: robotframework-tidy>=2.0.0; extra == 'tidy'
|
65
65
|
Provides-Extra: yaml
|
@@ -43,6 +43,10 @@ create-json-schema = "python ./scripts/create_robot_toml_json_schema.py"
|
|
43
43
|
generate-rf-options = "python ./scripts/generate_rf_options.py"
|
44
44
|
install-packages = "python ./scripts/install_packages.py"
|
45
45
|
|
46
|
+
[envs.rflatest313]
|
47
|
+
python = "3.13"
|
48
|
+
extra-dependencies = ["robotframework==7.1"]
|
49
|
+
|
46
50
|
[envs.rfmaster313]
|
47
51
|
python = "3.13"
|
48
52
|
extra-dependencies = [
|
@@ -50,9 +50,9 @@ classifiers = [
|
|
50
50
|
]
|
51
51
|
requires-python = ">=3.8"
|
52
52
|
dependencies = [
|
53
|
-
"robotcode-core==0.
|
54
|
-
"robotcode-plugin==0.
|
55
|
-
"robotcode-robot==0.
|
53
|
+
"robotcode-core==0.92.0",
|
54
|
+
"robotcode-plugin==0.92.0",
|
55
|
+
"robotcode-robot==0.92.0",
|
56
56
|
]
|
57
57
|
dynamic = ["version"]
|
58
58
|
|
@@ -70,20 +70,20 @@ robotcode = "robotcode.cli.__main__:main"
|
|
70
70
|
|
71
71
|
|
72
72
|
[project.optional-dependencies]
|
73
|
-
debugger = ["robotcode-debugger==0.
|
74
|
-
languageserver = ["robotcode-language-server==0.
|
75
|
-
runner = ["robotcode-runner==0.
|
76
|
-
analyze = ["robotcode-analyze==0.
|
73
|
+
debugger = ["robotcode-debugger==0.92.0"]
|
74
|
+
languageserver = ["robotcode-language-server==0.92.0"]
|
75
|
+
runner = ["robotcode-runner==0.92.0"]
|
76
|
+
analyze = ["robotcode-analyze==0.92.0"]
|
77
77
|
yaml = ["PyYAML>=5.4"]
|
78
78
|
lint = ["robotframework-robocop>=2.0.0"]
|
79
79
|
tidy = ["robotframework-tidy>=2.0.0"]
|
80
80
|
rest = ["docutils"]
|
81
81
|
colored = ["rich"]
|
82
82
|
all = [
|
83
|
-
"robotcode-debugger==0.
|
84
|
-
"robotcode-language-server==0.
|
85
|
-
"robotcode-runner==0.
|
86
|
-
"robotcode-analyze==0.
|
83
|
+
"robotcode-debugger==0.92.0",
|
84
|
+
"robotcode-language-server==0.92.0",
|
85
|
+
"robotcode-runner==0.92.0",
|
86
|
+
"robotcode-analyze==0.92.0",
|
87
87
|
"PyYAML>=5.4",
|
88
88
|
"robotframework-robocop>=2.0.0",
|
89
89
|
"robotframework-tidy>=2.0.0",
|
@@ -318,3 +318,8 @@ pre_bump_hooks = [
|
|
318
318
|
"hatch run build:update-changelog",
|
319
319
|
"git add .",
|
320
320
|
]
|
321
|
+
|
322
|
+
|
323
|
+
[tool.robotcode-analyze.extend-modifiers]
|
324
|
+
information = ["info_from_pyproject_toml"]
|
325
|
+
extend-hint = ["a_hint_from_pyproject_toml"]
|
@@ -240,9 +240,8 @@ def robotcode(
|
|
240
240
|
robotcode.add_command(config)
|
241
241
|
robotcode.add_command(profiles)
|
242
242
|
|
243
|
-
for
|
244
|
-
|
245
|
-
robotcode.add_command(c)
|
243
|
+
for c in PluginManager.instance().cli_commands:
|
244
|
+
robotcode.add_command(c)
|
246
245
|
|
247
246
|
|
248
247
|
@robotcode.command()
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.92.0"
|
@@ -2,7 +2,7 @@ import dataclasses
|
|
2
2
|
import os
|
3
3
|
from fnmatch import fnmatchcase
|
4
4
|
from pathlib import Path
|
5
|
-
from typing import Any, Dict, List, Optional
|
5
|
+
from typing import Any, Callable, Dict, Iterable, List, Optional, Type, Union, get_args, get_origin
|
6
6
|
|
7
7
|
import click
|
8
8
|
|
@@ -20,11 +20,9 @@ from robotcode.robot.config.loader import (
|
|
20
20
|
load_robot_config_from_path,
|
21
21
|
)
|
22
22
|
from robotcode.robot.config.model import (
|
23
|
-
|
24
|
-
RebotProfile,
|
23
|
+
BaseOptions,
|
25
24
|
RobotConfig,
|
26
25
|
RobotProfile,
|
27
|
-
TestDocProfile,
|
28
26
|
)
|
29
27
|
from robotcode.robot.config.utils import get_config_files
|
30
28
|
|
@@ -70,7 +68,11 @@ def show(app: Application, single: bool, paths: List[Path]) -> None:
|
|
70
68
|
|
71
69
|
if single:
|
72
70
|
for file, _ in config_files:
|
73
|
-
config = load_robot_config_from_path(
|
71
|
+
config = load_robot_config_from_path(
|
72
|
+
file,
|
73
|
+
extra_tools={k: v for k, v in PluginManager.instance().tool_config_classes},
|
74
|
+
verbose_callback=app.verbose,
|
75
|
+
)
|
74
76
|
click.secho(f"File: {file}")
|
75
77
|
app.print_data(
|
76
78
|
config,
|
@@ -80,7 +82,11 @@ def show(app: Application, single: bool, paths: List[Path]) -> None:
|
|
80
82
|
|
81
83
|
return
|
82
84
|
|
83
|
-
config = load_robot_config_from_path(
|
85
|
+
config = load_robot_config_from_path(
|
86
|
+
*config_files,
|
87
|
+
extra_tools={k: v for k, v in PluginManager.instance().tool_config_classes},
|
88
|
+
verbose_callback=app.verbose,
|
89
|
+
)
|
84
90
|
|
85
91
|
app.print_data(
|
86
92
|
config,
|
@@ -193,55 +199,51 @@ def info(app: Application) -> None:
|
|
193
199
|
"""Shows informations about possible configuration settings."""
|
194
200
|
|
195
201
|
|
196
|
-
def
|
197
|
-
|
198
|
-
|
199
|
-
field_name_encoded = encode_case_for_field_name(RobotConfig, field)
|
200
|
-
result[field_name_encoded] = {
|
201
|
-
"type": str(field.type),
|
202
|
-
"description": field.metadata.get("description", "").strip(),
|
203
|
-
}
|
202
|
+
def type_to_str(t: Union[Type[Any], str]) -> str:
|
203
|
+
if isinstance(t, str):
|
204
|
+
return f"'{t}'"
|
204
205
|
|
205
|
-
|
206
|
-
|
207
|
-
|
206
|
+
origin = get_origin(t)
|
207
|
+
if origin is None:
|
208
|
+
return t.__name__
|
209
|
+
|
210
|
+
if origin is Union:
|
211
|
+
return " | ".join(type_to_str(a) for a in get_args(t))
|
212
|
+
|
213
|
+
return f"{origin.__name__}[{', '.join(type_to_str(a) for a in get_args(t))}]"
|
214
|
+
|
215
|
+
|
216
|
+
def _get_config_fields_for_type(
|
217
|
+
prefix: str, cls: Type[Any], filter: Optional[Callable[[str], bool]] = None
|
218
|
+
) -> Dict[str, Dict[str, str]]:
|
219
|
+
result = {}
|
220
|
+
for field in dataclasses.fields(cls):
|
221
|
+
field_name_encoded = encode_case_for_field_name(cls, field)
|
222
|
+
if filter and not filter(field_name_encoded):
|
208
223
|
continue
|
209
224
|
|
210
|
-
result[
|
211
|
-
"type":
|
225
|
+
result[prefix + field_name_encoded] = {
|
226
|
+
"type": type_to_str(field.type),
|
212
227
|
"description": field.metadata.get("description", "").strip(),
|
213
228
|
}
|
229
|
+
args = get_args(field.type)
|
214
230
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
231
|
+
p = f"{prefix}{'' if prefix[-1]=='.' else '.'}" if prefix else ""
|
232
|
+
for a in args:
|
233
|
+
origin = get_origin(a)
|
234
|
+
if origin is None and issubclass(a, BaseOptions):
|
235
|
+
result.update(_get_config_fields_for_type(f"{p}{field_name_encoded}.", a, filter))
|
236
|
+
return result
|
221
237
|
|
222
|
-
for field in dataclasses.fields(LibDocProfile):
|
223
|
-
field_name_encoded = encode_case_for_field_name(LibDocProfile, field)
|
224
|
-
result["libdoc." + field_name_encoded] = {
|
225
|
-
"type": str(field.type),
|
226
|
-
"description": field.metadata.get("description", "").strip(),
|
227
|
-
}
|
228
238
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
"type": str(field.type),
|
233
|
-
"description": field.metadata.get("description", "").strip(),
|
234
|
-
}
|
239
|
+
def get_config_fields() -> Dict[str, Dict[str, str]]:
|
240
|
+
result = {}
|
241
|
+
result.update(_get_config_fields_for_type("", RobotConfig))
|
235
242
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
field_name_encoded = encode_case_for_field_name(TestDocProfile, field)
|
241
|
-
result[f"{s}." + field_name_encoded] = {
|
242
|
-
"type": str(field.type),
|
243
|
-
"description": field.metadata.get("description", "").strip(),
|
244
|
-
}
|
243
|
+
result.update(_get_config_fields_for_type("[profile].", RobotProfile, lambda x: x not in result))
|
244
|
+
for entry in PluginManager.instance().tool_config_classes:
|
245
|
+
if dataclasses.is_dataclass(entry.config_class):
|
246
|
+
result.update(_get_config_fields_for_type(f"tool.{entry.tool_name}.", entry.config_class))
|
245
247
|
|
246
248
|
return {k: v for k, v in sorted(result.items(), key=lambda item: item[0])}
|
247
249
|
|
@@ -275,7 +277,15 @@ def list(app: Application, name: Optional[List[str]] = None) -> None:
|
|
275
277
|
result.append(field)
|
276
278
|
|
277
279
|
if app.config.output_format is None or app.config.output_format == OutputFormat.TEXT:
|
278
|
-
|
280
|
+
|
281
|
+
def output() -> Iterable[str]:
|
282
|
+
for r in result:
|
283
|
+
yield r + os.linesep
|
284
|
+
|
285
|
+
yield os.linesep
|
286
|
+
yield f"Total: {len(result)}"
|
287
|
+
|
288
|
+
app.echo_via_pager(output())
|
279
289
|
else:
|
280
290
|
app.print_data({"names": result})
|
281
291
|
|
@@ -42,7 +42,7 @@ def show(app: Application, no_evaluate: bool, paths: List[Path]) -> None:
|
|
42
42
|
try:
|
43
43
|
config_files, _, _ = get_config_files(paths, app.config.config_files, verbose_callback=app.verbose)
|
44
44
|
|
45
|
-
config = load_robot_config_from_path(*config_files).combine_profiles(
|
45
|
+
config = load_robot_config_from_path(*config_files, verbose_callback=app.verbose).combine_profiles(
|
46
46
|
*(app.config.profiles or []), verbose_callback=app.verbose, error_callback=app.error
|
47
47
|
)
|
48
48
|
|
@@ -75,7 +75,7 @@ def list(app: Application, paths: List[Path], show_hidden: bool = False, sort_by
|
|
75
75
|
try:
|
76
76
|
config_files, _, discovered_by = get_config_files(paths, app.config.config_files, verbose_callback=app.verbose)
|
77
77
|
|
78
|
-
config = load_robot_config_from_path(*config_files)
|
78
|
+
config = load_robot_config_from_path(*config_files, verbose_callback=app.verbose)
|
79
79
|
|
80
80
|
_, selected_profiles, enabled_names = config.combine_profiles_ex(
|
81
81
|
*(app.config.profiles or []), verbose_callback=app.verbose, error_callback=app.error
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.91.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|