robotcode-robot 1.0.2__py3-none-any.whl → 1.1.0__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/robot/__version__.py +1 -1
- robotcode/robot/diagnostics/data_cache.py +0 -1
- robotcode/robot/diagnostics/imports_manager.py +4 -3
- robotcode/robot/diagnostics/library_doc.py +12 -4
- robotcode/robot/diagnostics/namespace.py +18 -6
- robotcode/robot/diagnostics/namespace_analyzer.py +18 -8
- robotcode/robot/utils/markdownformatter.py +3 -3
- {robotcode_robot-1.0.2.dist-info → robotcode_robot-1.1.0.dist-info}/METADATA +2 -2
- {robotcode_robot-1.0.2.dist-info → robotcode_robot-1.1.0.dist-info}/RECORD +11 -11
- {robotcode_robot-1.0.2.dist-info → robotcode_robot-1.1.0.dist-info}/WHEEL +0 -0
- {robotcode_robot-1.0.2.dist-info → robotcode_robot-1.1.0.dist-info}/licenses/LICENSE.txt +0 -0
robotcode/robot/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.0
|
1
|
+
__version__ = "1.1.0"
|
@@ -226,7 +226,9 @@ class _LibrariesEntry(_ImportEntry):
|
|
226
226
|
source_or_origin = (
|
227
227
|
self._lib_doc.source
|
228
228
|
if self._lib_doc.source is not None
|
229
|
-
else self._lib_doc.module_spec.origin
|
229
|
+
else self._lib_doc.module_spec.origin
|
230
|
+
if self._lib_doc.module_spec is not None
|
231
|
+
else None
|
230
232
|
)
|
231
233
|
|
232
234
|
# we are a module, so add the module path into file watchers
|
@@ -1226,8 +1228,7 @@ class ImportsManager:
|
|
1226
1228
|
saved_meta = self.data_cache.read_cache_data(CacheSection.LIBRARY, meta_file, LibraryMetaData)
|
1227
1229
|
if saved_meta.has_errors:
|
1228
1230
|
self._logger.debug(
|
1229
|
-
lambda: f"Saved library spec for {name}{args!r} is not used "
|
1230
|
-
"due to errors in meta data",
|
1231
|
+
lambda: f"Saved library spec for {name}{args!r} is not used due to errors in meta data",
|
1231
1232
|
context_name="import",
|
1232
1233
|
)
|
1233
1234
|
|
@@ -1797,7 +1797,9 @@ def get_library_doc(
|
|
1797
1797
|
source=(
|
1798
1798
|
source or module_spec.origin
|
1799
1799
|
if module_spec is not None and module_spec.origin
|
1800
|
-
else import_name
|
1800
|
+
else import_name
|
1801
|
+
if is_library_by_path(import_name)
|
1802
|
+
else None
|
1801
1803
|
),
|
1802
1804
|
module_spec=module_spec,
|
1803
1805
|
errors=[
|
@@ -1806,7 +1808,9 @@ def get_library_doc(
|
|
1806
1808
|
(
|
1807
1809
|
source or module_spec.origin
|
1808
1810
|
if module_spec is not None and module_spec.origin
|
1809
|
-
else import_name
|
1811
|
+
else import_name
|
1812
|
+
if is_library_by_path(import_name)
|
1813
|
+
else None
|
1810
1814
|
),
|
1811
1815
|
(
|
1812
1816
|
1
|
@@ -2402,7 +2406,9 @@ def get_variables_doc(
|
|
2402
2406
|
(
|
2403
2407
|
source or module_spec.origin
|
2404
2408
|
if module_spec is not None and module_spec.origin
|
2405
|
-
else import_name
|
2409
|
+
else import_name
|
2410
|
+
if is_variables_by_path(import_name)
|
2411
|
+
else None
|
2406
2412
|
),
|
2407
2413
|
(
|
2408
2414
|
1
|
@@ -2426,7 +2432,9 @@ def get_variables_doc(
|
|
2426
2432
|
(
|
2427
2433
|
source or module_spec.origin
|
2428
2434
|
if module_spec is not None and module_spec.origin
|
2429
|
-
else import_name
|
2435
|
+
else import_name
|
2436
|
+
if is_variables_by_path(import_name)
|
2437
|
+
else None
|
2430
2438
|
),
|
2431
2439
|
1 if source is not None or (module_spec is not None and module_spec.origin is not None) else None,
|
2432
2440
|
)
|
@@ -582,12 +582,16 @@ class ImportVisitor(Visitor):
|
|
582
582
|
end_line_no=(
|
583
583
|
last_data_token.lineno
|
584
584
|
if last_data_token is not None
|
585
|
-
else node.end_lineno
|
585
|
+
else node.end_lineno
|
586
|
+
if node.end_lineno is not None
|
587
|
+
else -1
|
586
588
|
),
|
587
589
|
end_col_offset=(
|
588
590
|
last_data_token.end_col_offset
|
589
591
|
if last_data_token is not None
|
590
|
-
else node.end_col_offset
|
592
|
+
else node.end_col_offset
|
593
|
+
if node.end_col_offset is not None
|
594
|
+
else -1
|
591
595
|
),
|
592
596
|
source=self.source,
|
593
597
|
)
|
@@ -607,12 +611,16 @@ class ImportVisitor(Visitor):
|
|
607
611
|
end_line_no=(
|
608
612
|
last_data_token.lineno
|
609
613
|
if last_data_token is not None
|
610
|
-
else node.end_lineno
|
614
|
+
else node.end_lineno
|
615
|
+
if node.end_lineno is not None
|
616
|
+
else -1
|
611
617
|
),
|
612
618
|
end_col_offset=(
|
613
619
|
last_data_token.end_col_offset
|
614
620
|
if last_data_token is not None
|
615
|
-
else node.end_col_offset
|
621
|
+
else node.end_col_offset
|
622
|
+
if node.end_col_offset is not None
|
623
|
+
else -1
|
616
624
|
),
|
617
625
|
source=self.source,
|
618
626
|
)
|
@@ -633,12 +641,16 @@ class ImportVisitor(Visitor):
|
|
633
641
|
end_line_no=(
|
634
642
|
last_data_token.lineno
|
635
643
|
if last_data_token is not None
|
636
|
-
else node.end_lineno
|
644
|
+
else node.end_lineno
|
645
|
+
if node.end_lineno is not None
|
646
|
+
else -1
|
637
647
|
),
|
638
648
|
end_col_offset=(
|
639
649
|
last_data_token.end_col_offset
|
640
650
|
if last_data_token is not None
|
641
|
-
else node.end_col_offset
|
651
|
+
else node.end_col_offset
|
652
|
+
if node.end_col_offset is not None
|
653
|
+
else -1
|
642
654
|
),
|
643
655
|
source=self.source,
|
644
656
|
)
|
@@ -332,6 +332,10 @@ class NamespaceAnalyzer(Visitor):
|
|
332
332
|
if not is_variable(var_name):
|
333
333
|
return
|
334
334
|
|
335
|
+
stripped_variable = strip_variable_token(
|
336
|
+
Token(variable.type, var_name, variable.lineno, variable.col_offset, variable.error)
|
337
|
+
)
|
338
|
+
|
335
339
|
scope = cast(Var, node).scope
|
336
340
|
if scope:
|
337
341
|
scope = scope.upper()
|
@@ -347,11 +351,11 @@ class NamespaceAnalyzer(Visitor):
|
|
347
351
|
|
348
352
|
var = var_type(
|
349
353
|
name=var_name,
|
350
|
-
name_token=strip_variable_token(
|
351
|
-
line_no=
|
352
|
-
col_offset=
|
353
|
-
end_line_no=
|
354
|
-
end_col_offset=
|
354
|
+
name_token=strip_variable_token(stripped_variable),
|
355
|
+
line_no=stripped_variable.lineno,
|
356
|
+
col_offset=stripped_variable.col_offset,
|
357
|
+
end_line_no=stripped_variable.lineno,
|
358
|
+
end_col_offset=stripped_variable.end_col_offset,
|
355
359
|
source=self._namespace.source,
|
356
360
|
)
|
357
361
|
|
@@ -361,7 +365,9 @@ class NamespaceAnalyzer(Visitor):
|
|
361
365
|
else:
|
362
366
|
existing_var = self._variables[var.matcher]
|
363
367
|
|
364
|
-
location = Location(
|
368
|
+
location = Location(
|
369
|
+
self._namespace.document_uri, range_from_token(strip_variable_token(stripped_variable))
|
370
|
+
)
|
365
371
|
self._variable_references[existing_var].add(location)
|
366
372
|
if existing_var in self._overridden_variables:
|
367
373
|
self._variable_references[self._overridden_variables[existing_var]].add(location)
|
@@ -670,7 +676,9 @@ class NamespaceAnalyzer(Visitor):
|
|
670
676
|
Uri.from_path(
|
671
677
|
err.source
|
672
678
|
if err.source is not None
|
673
|
-
else result.source
|
679
|
+
else result.source
|
680
|
+
if result.source is not None
|
681
|
+
else "/<unknown>"
|
674
682
|
)
|
675
683
|
),
|
676
684
|
range=Range(
|
@@ -1637,7 +1645,9 @@ class NamespaceAnalyzer(Visitor):
|
|
1637
1645
|
vars = (
|
1638
1646
|
self._block_variables
|
1639
1647
|
if self._block_variables and self._in_block_setting
|
1640
|
-
else self._suite_variables
|
1648
|
+
else self._suite_variables
|
1649
|
+
if self._in_setting
|
1650
|
+
else self._variables
|
1641
1651
|
)
|
1642
1652
|
|
1643
1653
|
try:
|
@@ -333,14 +333,14 @@ class TableFormatter(Formatter):
|
|
333
333
|
|
334
334
|
for row in header_rows or [[]]:
|
335
335
|
row += [""] * (max_columns - len(row))
|
336
|
-
table.append(f
|
336
|
+
table.append(f"|{'|'.join(self._format_cell(cell) for cell in row)}|")
|
337
337
|
|
338
338
|
row_ = [" :--- "] * max_columns
|
339
|
-
table.append(f
|
339
|
+
table.append(f"|{'|'.join(row_)}|")
|
340
340
|
|
341
341
|
for row in body_rows:
|
342
342
|
row += [""] * (max_columns - len(row))
|
343
|
-
table.append(f
|
343
|
+
table.append(f"|{'|'.join(self._format_cell(cell) for cell in row)}|")
|
344
344
|
|
345
345
|
return "\n".join(table) + "\n\n"
|
346
346
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: robotcode-robot
|
3
|
-
Version: 1.0
|
3
|
+
Version: 1.1.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://opencollective.com/robotcode
|
@@ -26,7 +26,7 @@ Classifier: Topic :: Utilities
|
|
26
26
|
Classifier: Typing :: Typed
|
27
27
|
Requires-Python: >=3.8
|
28
28
|
Requires-Dist: platformdirs<4.4.0,>=3.2.0
|
29
|
-
Requires-Dist: robotcode-core==1.0
|
29
|
+
Requires-Dist: robotcode-core==1.1.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
|
@@ -1,32 +1,32 @@
|
|
1
1
|
robotcode/robot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
robotcode/robot/__version__.py,sha256=
|
2
|
+
robotcode/robot/__version__.py,sha256=LGVQyDsWifdACo7qztwb8RWWHds1E7uQ-ZqD8SAjyw4,22
|
3
3
|
robotcode/robot/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
|
4
4
|
robotcode/robot/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
robotcode/robot/config/loader.py,sha256=qrP810HNMDpqhXopWa0dOa0Wq_zQfVctsNYKY6sLKGI,8654
|
6
6
|
robotcode/robot/config/model.py,sha256=sgr6-4_E06g-yIXW41Z-NtIXZ_7JMmR5WvUD7kTUqu4,89106
|
7
7
|
robotcode/robot/config/utils.py,sha256=xY-LH31BidWzonpvSrle-4HvKrp02I7IRqU2JwlL4Ls,2931
|
8
8
|
robotcode/robot/diagnostics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
-
robotcode/robot/diagnostics/data_cache.py,sha256=
|
9
|
+
robotcode/robot/diagnostics/data_cache.py,sha256=duLbcKzwqlCC1tBvJY8ASYh2LcIoCSs8_NgQ8NUQ7VU,3186
|
10
10
|
robotcode/robot/diagnostics/diagnostics_modifier.py,sha256=6zJdXBd6g1QM12XJbsHd8gNNysECMnWlne3q8XNgBDo,9797
|
11
11
|
robotcode/robot/diagnostics/document_cache_helper.py,sha256=5H0S7qDCeoEmqjMLUE7EQy9iZcZTYIUl5H1Pdvn5s5I,23886
|
12
12
|
robotcode/robot/diagnostics/entities.py,sha256=I55YMxXpl7C1Sx6GgxRqb7vWMK7uWIoB7GhR1X9b66c,12983
|
13
13
|
robotcode/robot/diagnostics/errors.py,sha256=RGnE4KCgNxQ58hNMBuAD3Q-qWqZVWZSZsCnhBGtQScw,1975
|
14
|
-
robotcode/robot/diagnostics/imports_manager.py,sha256=
|
14
|
+
robotcode/robot/diagnostics/imports_manager.py,sha256=hu4Wp9b8J1jk55-NBqK2teQieWQF5D8LKxM5fyaxI1U,61156
|
15
15
|
robotcode/robot/diagnostics/keyword_finder.py,sha256=dm4BA0ccp5V4C65CkSYUJUNXegSmvG24uu09T3eL6a4,17319
|
16
|
-
robotcode/robot/diagnostics/library_doc.py,sha256=
|
16
|
+
robotcode/robot/diagnostics/library_doc.py,sha256=ruHS1bjOae0v4HQ2zH-B0baP_zs8BFa7mjsIb8tyvp4,100541
|
17
17
|
robotcode/robot/diagnostics/model_helper.py,sha256=nq78e6TQ9Anvz_VSLW560lRTKrRjBsh7NoWttEvJ2hw,30973
|
18
|
-
robotcode/robot/diagnostics/namespace.py,sha256=
|
19
|
-
robotcode/robot/diagnostics/namespace_analyzer.py,sha256=
|
18
|
+
robotcode/robot/diagnostics/namespace.py,sha256=qSE-1z8U8AoE7HyY-cUMLgaEETjMB3gQr3IHLVdgFSU,78941
|
19
|
+
robotcode/robot/diagnostics/namespace_analyzer.py,sha256=ksa9Mmexnvo8XWscm-OLqG9jd2lxetYLtmVx0KgCkj4,76047
|
20
20
|
robotcode/robot/diagnostics/workspace_config.py,sha256=gyKR5z-HpnjxPAui3YujgeZqXX7RYBO_ErGVlk7vnGc,2689
|
21
21
|
robotcode/robot/utils/__init__.py,sha256=OjNPMn_XSnfaMCyKd8Kmq6vlRt6mIGlzW4qiiD3ykUg,447
|
22
22
|
robotcode/robot/utils/ast.py,sha256=m5pNr2m84lmPP4yIstq5RHjLrj0u8RsSmy6iCXBnV4g,11092
|
23
|
-
robotcode/robot/utils/markdownformatter.py,sha256=
|
23
|
+
robotcode/robot/utils/markdownformatter.py,sha256=v2p4T-d0wc0SuUJ4iLJJg1pHjgIA6dZX4l_XnZIXjXM,11690
|
24
24
|
robotcode/robot/utils/match.py,sha256=9tG1OD9KS1v9ocWgsERSf6z_w9gAeE5LourNUYHzvTM,653
|
25
25
|
robotcode/robot/utils/robot_path.py,sha256=Z-GVBOPA_xeD20bCJi4_AWaU0eQWvCym-YFtyRpXARE,1767
|
26
26
|
robotcode/robot/utils/stubs.py,sha256=umugZYAyneFNgqRJBRMJPzm0u0B_TH8Sx_y-ykXnxpw,351
|
27
27
|
robotcode/robot/utils/variables.py,sha256=-ldL8mRRSYYW2pwlm8IpoDeQcG6LYBqaYyV_7U3xsIc,2174
|
28
28
|
robotcode/robot/utils/visitor.py,sha256=nP3O0qh3YYuxR6S8wYJRBFfNwIVgsgohURBlrnFkRYQ,2299
|
29
|
-
robotcode_robot-1.0.
|
30
|
-
robotcode_robot-1.0.
|
31
|
-
robotcode_robot-1.0.
|
32
|
-
robotcode_robot-1.0.
|
29
|
+
robotcode_robot-1.1.0.dist-info/METADATA,sha256=9clEMI2FUOz5qd4N8VmYxi5qc24c0zdMzr7zh9I0XWg,2238
|
30
|
+
robotcode_robot-1.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
31
|
+
robotcode_robot-1.1.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
|
32
|
+
robotcode_robot-1.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|