robotcode-robot 0.106.1__py3-none-any.whl → 0.108.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/entities.py +36 -0
- robotcode/robot/diagnostics/library_doc.py +0 -21
- robotcode/robot/diagnostics/namespace.py +16 -6
- robotcode/robot/diagnostics/namespace_analyzer.py +18 -0
- {robotcode_robot-0.106.1.dist-info → robotcode_robot-0.108.0.dist-info}/METADATA +2 -2
- {robotcode_robot-0.106.1.dist-info → robotcode_robot-0.108.0.dist-info}/RECORD +9 -9
- {robotcode_robot-0.106.1.dist-info → robotcode_robot-0.108.0.dist-info}/WHEEL +0 -0
- {robotcode_robot-0.106.1.dist-info → robotcode_robot-0.108.0.dist-info}/licenses/LICENSE.txt +0 -0
robotcode/robot/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.
|
1
|
+
__version__ = "0.108.0"
|
@@ -394,3 +394,39 @@ class VariablesEntry(LibraryEntry):
|
|
394
394
|
self.import_source,
|
395
395
|
)
|
396
396
|
)
|
397
|
+
|
398
|
+
|
399
|
+
@dataclass
|
400
|
+
class TestCaseDefinition(SourceEntity):
|
401
|
+
name: str
|
402
|
+
|
403
|
+
@single_call
|
404
|
+
def __hash__(self) -> int:
|
405
|
+
return hash(
|
406
|
+
(
|
407
|
+
self.line_no,
|
408
|
+
self.col_offset,
|
409
|
+
self.end_line_no,
|
410
|
+
self.end_col_offset,
|
411
|
+
self.source,
|
412
|
+
self.name,
|
413
|
+
)
|
414
|
+
)
|
415
|
+
|
416
|
+
|
417
|
+
@dataclass
|
418
|
+
class TagDefinition(SourceEntity):
|
419
|
+
name: str
|
420
|
+
|
421
|
+
@single_call
|
422
|
+
def __hash__(self) -> int:
|
423
|
+
return hash(
|
424
|
+
(
|
425
|
+
self.line_no,
|
426
|
+
self.col_offset,
|
427
|
+
self.end_line_no,
|
428
|
+
self.end_col_offset,
|
429
|
+
self.source,
|
430
|
+
self.name,
|
431
|
+
)
|
432
|
+
)
|
@@ -2,7 +2,6 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
import ast
|
4
4
|
import functools
|
5
|
-
import hashlib
|
6
5
|
import importlib
|
7
6
|
import importlib.util
|
8
7
|
import io
|
@@ -634,7 +633,6 @@ class KeywordDoc(SourceEntity):
|
|
634
633
|
deprecated: bool = field(default=False, compare=False)
|
635
634
|
return_type: Optional[str] = field(default=None, compare=False)
|
636
635
|
|
637
|
-
parent_digest: Optional[str] = field(default=None, init=False, metadata={"nosave": True})
|
638
636
|
parent: Optional[LibraryDoc] = field(default=None, init=False, metadata={"nosave": True})
|
639
637
|
|
640
638
|
def _get_argument_definitions(self) -> Optional[List[ArgumentDefinition]]:
|
@@ -656,16 +654,7 @@ class KeywordDoc(SourceEntity):
|
|
656
654
|
else []
|
657
655
|
)
|
658
656
|
|
659
|
-
digest: Optional[str] = field(init=False)
|
660
|
-
|
661
657
|
def __post_init__(self) -> None:
|
662
|
-
s = (
|
663
|
-
f"{self.name}|{self.source}|{self.line_no}|"
|
664
|
-
f"{self.end_line_no}|{self.col_offset}|{self.end_col_offset}|"
|
665
|
-
f"{self.type}|{self.libname}|{self.libtype}"
|
666
|
-
)
|
667
|
-
self.digest = hashlib.sha224(s.encode("utf-8")).hexdigest()
|
668
|
-
|
669
658
|
if self.argument_definitions is None:
|
670
659
|
self.argument_definitions = self._get_argument_definitions()
|
671
660
|
|
@@ -1030,8 +1019,6 @@ class LibraryDoc:
|
|
1030
1019
|
has_listener: Optional[bool] = None
|
1031
1020
|
library_type: Optional[LibraryType] = None
|
1032
1021
|
|
1033
|
-
digest: Optional[str] = field(init=False)
|
1034
|
-
|
1035
1022
|
@property
|
1036
1023
|
def inits(self) -> KeywordStore:
|
1037
1024
|
return self._inits
|
@@ -1056,16 +1043,8 @@ class LibraryDoc:
|
|
1056
1043
|
|
1057
1044
|
for k in keywords:
|
1058
1045
|
k.parent = self
|
1059
|
-
k.parent_digest = self.digest
|
1060
1046
|
|
1061
1047
|
def __post_init__(self) -> None:
|
1062
|
-
s = (
|
1063
|
-
f"{self.name}|{self.source}|{self.line_no}|"
|
1064
|
-
f"{self.end_line_no}|{self.version}|"
|
1065
|
-
f"{self.type}|{self.scope}|{self.doc_format}"
|
1066
|
-
)
|
1067
|
-
self.digest = hashlib.sha224(s.encode("utf-8")).hexdigest()
|
1068
|
-
|
1069
1048
|
self._update_keywords(self._inits)
|
1070
1049
|
self._update_keywords(self._keywords)
|
1071
1050
|
|
@@ -72,6 +72,8 @@ from .entities import (
|
|
72
72
|
LocalVariableDefinition,
|
73
73
|
ResourceEntry,
|
74
74
|
ResourceImport,
|
75
|
+
TagDefinition,
|
76
|
+
TestCaseDefinition,
|
75
77
|
TestVariableDefinition,
|
76
78
|
VariableDefinition,
|
77
79
|
VariableMatcher,
|
@@ -720,6 +722,9 @@ class Namespace:
|
|
720
722
|
self._local_variable_assignments: Dict[VariableDefinition, Set[Range]] = {}
|
721
723
|
self._namespace_references: Dict[LibraryEntry, Set[Location]] = {}
|
722
724
|
|
725
|
+
self._test_case_definitions: List[TestCaseDefinition] = []
|
726
|
+
self._tag_definitions: List[TagDefinition] = []
|
727
|
+
|
723
728
|
self._imported_keywords: Optional[List[KeywordDoc]] = None
|
724
729
|
self._imported_keywords_lock = RLock(default_timeout=120, name="Namespace.imported_keywords")
|
725
730
|
self._keywords: Optional[List[KeywordDoc]] = None
|
@@ -847,18 +852,21 @@ class Namespace:
|
|
847
852
|
|
848
853
|
return self._keyword_references
|
849
854
|
|
850
|
-
def get_variable_references(
|
851
|
-
self,
|
852
|
-
) -> Dict[VariableDefinition, Set[Location]]:
|
855
|
+
def get_variable_references(self) -> Dict[VariableDefinition, Set[Location]]:
|
853
856
|
self.ensure_initialized()
|
854
857
|
|
855
858
|
self.analyze()
|
856
859
|
|
857
860
|
return self._variable_references
|
858
861
|
|
859
|
-
def
|
860
|
-
self
|
861
|
-
|
862
|
+
def get_testcase_definitions(self) -> List[TestCaseDefinition]:
|
863
|
+
self.ensure_initialized()
|
864
|
+
|
865
|
+
self.analyze()
|
866
|
+
|
867
|
+
return self._test_case_definitions
|
868
|
+
|
869
|
+
def get_local_variable_assignments(self) -> Dict[VariableDefinition, Set[Range]]:
|
862
870
|
self.ensure_initialized()
|
863
871
|
|
864
872
|
self.analyze()
|
@@ -1910,6 +1918,8 @@ class Namespace:
|
|
1910
1918
|
self._variable_references = result.variable_references
|
1911
1919
|
self._local_variable_assignments = result.local_variable_assignments
|
1912
1920
|
self._namespace_references = result.namespace_references
|
1921
|
+
self._test_case_definitions = result.test_case_definitions
|
1922
|
+
self._tag_definitions = result.tag_definitions
|
1913
1923
|
|
1914
1924
|
lib_doc = self.get_library_doc()
|
1915
1925
|
|
@@ -63,6 +63,8 @@ from .entities import (
|
|
63
63
|
InvalidVariableError,
|
64
64
|
LibraryEntry,
|
65
65
|
LocalVariableDefinition,
|
66
|
+
TagDefinition,
|
67
|
+
TestCaseDefinition,
|
66
68
|
TestVariableDefinition,
|
67
69
|
VariableDefinition,
|
68
70
|
VariableDefinitionType,
|
@@ -92,6 +94,8 @@ class AnalyzerResult:
|
|
92
94
|
variable_references: Dict[VariableDefinition, Set[Location]]
|
93
95
|
local_variable_assignments: Dict[VariableDefinition, Set[Range]]
|
94
96
|
namespace_references: Dict[LibraryEntry, Set[Location]]
|
97
|
+
test_case_definitions: List[TestCaseDefinition]
|
98
|
+
tag_definitions: List[TagDefinition]
|
95
99
|
|
96
100
|
# TODO Tag references
|
97
101
|
|
@@ -121,6 +125,8 @@ class NamespaceAnalyzer(Visitor):
|
|
121
125
|
self._variable_references: Dict[VariableDefinition, Set[Location]] = defaultdict(set)
|
122
126
|
self._local_variable_assignments: Dict[VariableDefinition, Set[Range]] = defaultdict(set)
|
123
127
|
self._namespace_references: Dict[LibraryEntry, Set[Location]] = defaultdict(set)
|
128
|
+
self._test_case_definitions: List[TestCaseDefinition] = []
|
129
|
+
self._tag_definitions: List[TagDefinition] = []
|
124
130
|
|
125
131
|
self._variables: Dict[VariableMatcher, VariableDefinition] = {
|
126
132
|
**{v.matcher: v for v in self._namespace.get_builtin_variables()},
|
@@ -166,6 +172,8 @@ class NamespaceAnalyzer(Visitor):
|
|
166
172
|
self._variable_references,
|
167
173
|
self._local_variable_assignments,
|
168
174
|
self._namespace_references,
|
175
|
+
self._test_case_definitions,
|
176
|
+
self._tag_definitions,
|
169
177
|
)
|
170
178
|
|
171
179
|
def _visit_VariableSection(self, node: VariableSection) -> None: # noqa: N802
|
@@ -1048,6 +1056,16 @@ class NamespaceAnalyzer(Visitor):
|
|
1048
1056
|
name_token = node.get_token(Token.TESTCASE_NAME)
|
1049
1057
|
if name_token is not None and name_token.value:
|
1050
1058
|
self._analyze_token_variables(name_token, DiagnosticSeverity.HINT)
|
1059
|
+
self._test_case_definitions.append(
|
1060
|
+
TestCaseDefinition(
|
1061
|
+
line_no=name_token.lineno,
|
1062
|
+
col_offset=name_token.col_offset,
|
1063
|
+
end_line_no=name_token.lineno,
|
1064
|
+
end_col_offset=name_token.end_col_offset,
|
1065
|
+
source=self._namespace.source,
|
1066
|
+
name=name_token.value,
|
1067
|
+
)
|
1068
|
+
)
|
1051
1069
|
|
1052
1070
|
@functools.cached_property
|
1053
1071
|
def _namespace_lib_doc(self) -> LibraryDoc:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: robotcode-robot
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.108.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==0.
|
29
|
+
Requires-Dist: robotcode-core==0.108.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,5 +1,5 @@
|
|
1
1
|
robotcode/robot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
robotcode/robot/__version__.py,sha256=
|
2
|
+
robotcode/robot/__version__.py,sha256=JEOHZgUQDTlcB-baQWEy9fRq4GokkcN9OsdgKLdJmJM,24
|
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
|
@@ -9,14 +9,14 @@ robotcode/robot/diagnostics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
9
9
|
robotcode/robot/diagnostics/data_cache.py,sha256=Wge9HuxSUiBVMmrmlsYSMmG2ad7f3Texwox0Dm8lN7U,2969
|
10
10
|
robotcode/robot/diagnostics/diagnostics_modifier.py,sha256=6zJdXBd6g1QM12XJbsHd8gNNysECMnWlne3q8XNgBDo,9797
|
11
11
|
robotcode/robot/diagnostics/document_cache_helper.py,sha256=5H0S7qDCeoEmqjMLUE7EQy9iZcZTYIUl5H1Pdvn5s5I,23886
|
12
|
-
robotcode/robot/diagnostics/entities.py,sha256=
|
12
|
+
robotcode/robot/diagnostics/entities.py,sha256=JCqwsjBZThpqiMxHzXKdnpV3z-5ndYOyF3buk4UKJrw,11695
|
13
13
|
robotcode/robot/diagnostics/errors.py,sha256=RGnE4KCgNxQ58hNMBuAD3Q-qWqZVWZSZsCnhBGtQScw,1975
|
14
14
|
robotcode/robot/diagnostics/imports_manager.py,sha256=nrvK6W1KHYbfmHRyerHbY2s-9p9uVjRoJwa7PHc8rmg,61146
|
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=e8qEay6B16ZMNGZgDxtq-dhmQILCtQiPEGkNuY-24X0,99987
|
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=oLBXJkj-JEX--OMh9hIDfzpZxKvDOwH6Sle-SZG9s-Y,78653
|
19
|
+
robotcode/robot/diagnostics/namespace_analyzer.py,sha256=tZQOvPIsgrgLcynx_IRH4G7vXN0M_vZEtxBMC0ZMmO8,75653
|
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=lIQ_L1WG6Q2-yDOUEL1OjoGjrHzw62Md90BySzmXlPU,10768
|
@@ -26,7 +26,7 @@ robotcode/robot/utils/robot_path.py,sha256=Z-GVBOPA_xeD20bCJi4_AWaU0eQWvCym-YFty
|
|
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-0.
|
30
|
-
robotcode_robot-0.
|
31
|
-
robotcode_robot-0.
|
32
|
-
robotcode_robot-0.
|
29
|
+
robotcode_robot-0.108.0.dist-info/METADATA,sha256=WtWBBM8Z1A7MbCtupTp6YJVC8PdnVCy1sfAZ-enm1Fs,2242
|
30
|
+
robotcode_robot-0.108.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
31
|
+
robotcode_robot-0.108.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
|
32
|
+
robotcode_robot-0.108.0.dist-info/RECORD,,
|
File without changes
|
{robotcode_robot-0.106.1.dist-info → robotcode_robot-0.108.0.dist-info}/licenses/LICENSE.txt
RENAMED
File without changes
|