robotcode-robot 0.73.3__tar.gz → 0.75.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/PKG-INFO +2 -2
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/pyproject.toml +1 -1
- robotcode_robot-0.75.0/src/robotcode/robot/__version__.py +1 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/config/loader.py +7 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/config/utils.py +19 -14
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/library_doc.py +5 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/namespace.py +2 -2
- robotcode_robot-0.73.3/src/robotcode/robot/__version__.py +0 -1
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/.gitignore +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/LICENSE.txt +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/README.md +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/__init__.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/config/__init__.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/config/model.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/__init__.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/document_cache_helper.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/entities.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/errors.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/imports_manager.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/model_helper.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/namespace_analyzer.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/workspace_config.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/py.typed +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/__init__.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/ast.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/markdownformatter.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/match.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/robot_path.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/stubs.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/variables.py +0 -0
- {robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/visitor.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: robotcode-robot
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.75.0
|
4
4
|
Summary: Support classes for RobotCode for handling Robot Framework projects.
|
5
5
|
Project-URL: Homepage, https://robotcode.io
|
6
6
|
Project-URL: Donate, https://github.com/sponsors/d-biehl
|
@@ -26,7 +26,7 @@ Classifier: Topic :: Utilities
|
|
26
26
|
Classifier: Typing :: Typed
|
27
27
|
Requires-Python: >=3.8
|
28
28
|
Requires-Dist: platformdirs<4.2.0,>=3.2.0
|
29
|
-
Requires-Dist: robotcode-core==0.
|
29
|
+
Requires-Dist: robotcode-core==0.75.0
|
30
30
|
Requires-Dist: robotframework>=4.1.0
|
31
31
|
Requires-Dist: tomli>=1.1.0; python_version < '3.11'
|
32
32
|
Description-Content-Type: text/markdown
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.75.0"
|
@@ -34,6 +34,7 @@ class ConfigType(str, Enum):
|
|
34
34
|
ROBOT_TOML = "robot.toml (project file)"
|
35
35
|
LOCAL_ROBOT_TOML = ".robot.toml (local file)"
|
36
36
|
USER_DEFAULT_CONFIG_TOML = "robot.toml (user default config)"
|
37
|
+
DEFAULT_CONFIG_TOML = "(default config)"
|
37
38
|
CUSTOM_TOML = ".toml (custom file)"
|
38
39
|
|
39
40
|
|
@@ -118,6 +119,12 @@ def load_config_from_path(
|
|
118
119
|
result = config_type()
|
119
120
|
|
120
121
|
for __path in __paths:
|
122
|
+
if isinstance(__path, tuple):
|
123
|
+
path, c_type = __path
|
124
|
+
if path.name == "__no_user_config__.toml" and c_type == ConfigType.DEFAULT_CONFIG_TOML:
|
125
|
+
result.add_options(get_default_config())
|
126
|
+
continue
|
127
|
+
|
121
128
|
result.add_options(
|
122
129
|
_load_config_data_from_path(
|
123
130
|
config_type,
|
@@ -16,28 +16,29 @@ def get_user_config_file(
|
|
16
16
|
create: bool = True,
|
17
17
|
verbose_callback: Optional[Callable[[str], None]] = None,
|
18
18
|
) -> Optional[Path]:
|
19
|
-
|
20
|
-
|
21
|
-
if
|
22
|
-
verbose_callback
|
23
|
-
|
19
|
+
try:
|
20
|
+
result = Path(platformdirs.user_config_dir("robotcode", appauthor=False), "robot.toml")
|
21
|
+
if result.is_file():
|
22
|
+
if verbose_callback:
|
23
|
+
verbose_callback(f"Found user configuration file:\n {result}")
|
24
|
+
return result
|
25
|
+
|
26
|
+
if not create:
|
27
|
+
if verbose_callback:
|
28
|
+
verbose_callback("User configuration file not found, but create is set to False.")
|
29
|
+
return None
|
24
30
|
|
25
|
-
if not create:
|
26
31
|
if verbose_callback:
|
27
|
-
verbose_callback("User configuration file not found,
|
28
|
-
return None
|
32
|
+
verbose_callback(f"User configuration file not found, try to create it at:\n {result}")
|
29
33
|
|
30
|
-
if verbose_callback:
|
31
|
-
verbose_callback(f"User configuration file not found, try to create it at:\n {result}")
|
32
|
-
try:
|
33
34
|
get_default_config().save(result)
|
35
|
+
|
36
|
+
return result
|
34
37
|
except OSError as e:
|
35
38
|
if verbose_callback:
|
36
39
|
verbose_callback(f"Cannot create user configuration file `{result}`:\n {e}")
|
37
40
|
return None
|
38
41
|
|
39
|
-
return result
|
40
|
-
|
41
42
|
|
42
43
|
def get_config_files(
|
43
44
|
paths: Optional[Sequence[Union[str, Path]]] = None,
|
@@ -73,7 +74,11 @@ def get_config_files(
|
|
73
74
|
|
74
75
|
return (
|
75
76
|
[
|
76
|
-
*(
|
77
|
+
*(
|
78
|
+
[(user_config, ConfigType.USER_DEFAULT_CONFIG_TOML)]
|
79
|
+
if user_config
|
80
|
+
else [(Path("__no_user_config__.toml"), ConfigType.DEFAULT_CONFIG_TOML)]
|
81
|
+
),
|
77
82
|
*result,
|
78
83
|
],
|
79
84
|
root_folder,
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/library_doc.py
RENAMED
@@ -2118,14 +2118,19 @@ def get_variables_doc(
|
|
2118
2118
|
if import_name.lower().endswith((".yaml", ".yml")):
|
2119
2119
|
source = import_name
|
2120
2120
|
importer = YamlImporter()
|
2121
|
+
stem = Path(import_name).stem
|
2121
2122
|
elif get_robot_version() >= (6, 1) and import_name.lower().endswith(".json"):
|
2122
2123
|
source = import_name
|
2123
2124
|
importer = JsonImporter()
|
2125
|
+
stem = Path(import_name).stem
|
2124
2126
|
else:
|
2125
2127
|
python_import = True
|
2126
2128
|
|
2127
2129
|
if not is_variables_by_path(import_name):
|
2130
|
+
stem = import_name
|
2128
2131
|
module_spec = get_module_spec(import_name)
|
2132
|
+
else:
|
2133
|
+
stem = Path(import_name).stem
|
2129
2134
|
|
2130
2135
|
# skip antigravity easter egg
|
2131
2136
|
# see https://python-history.blogspot.com/2010/06/import-antigravity.html
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/namespace.py
RENAMED
@@ -1292,8 +1292,8 @@ class Namespace:
|
|
1292
1292
|
code=Error.VARIABLES_ALREADY_IMPORTED,
|
1293
1293
|
)
|
1294
1294
|
|
1295
|
-
if
|
1296
|
-
self._variables[entry.
|
1295
|
+
if entry.library_doc is not None and entry.library_doc.source_or_origin:
|
1296
|
+
self._variables[entry.library_doc.source_or_origin] = entry
|
1297
1297
|
|
1298
1298
|
elif isinstance(entry, LibraryEntry):
|
1299
1299
|
if top_level and entry.name == BUILTIN_LIBRARY_NAME and entry.alias is None:
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.73.3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/__init__.py
RENAMED
File without changes
|
File without changes
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/entities.py
RENAMED
File without changes
|
File without changes
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/imports_manager.py
RENAMED
File without changes
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/diagnostics/model_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{robotcode_robot-0.73.3 → robotcode_robot-0.75.0}/src/robotcode/robot/utils/markdownformatter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|