robotcode-robot 0.68.2__py3-none-any.whl → 0.68.5__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- __version__ = "0.68.2"
1
+ __version__ = "0.68.5"
@@ -32,7 +32,8 @@ from robotcode.core.utils.dataclasses import (
32
32
  )
33
33
  from robotcode.core.utils.safe_eval import safe_eval
34
34
 
35
- EXTEND_PREFIX_LEN = len("extend_")
35
+ EXTEND_PREFIX = "extend_"
36
+ EXTEND_PREFIX_LEN = len(EXTEND_PREFIX)
36
37
 
37
38
 
38
39
  class Flag(str, Enum):
@@ -308,12 +309,12 @@ class BaseOptions(ValidateMixin):
308
309
  )
309
310
  return value
310
311
 
311
- def add_options(self, config: "BaseOptions", combine_extras: bool = False) -> None:
312
+ def add_options(self, config: "BaseOptions", combine_extends: bool = False) -> None:
312
313
  type_hints = get_type_hints(type(self))
313
314
  base_field_names = [f.name for f in dataclasses.fields(self)]
314
315
 
315
316
  for f in dataclasses.fields(config):
316
- if f.name.startswith("extend_"):
317
+ if f.name.startswith(EXTEND_PREFIX):
317
318
  if f.name not in base_field_names:
318
319
  continue
319
320
 
@@ -326,7 +327,7 @@ class BaseOptions(ValidateMixin):
326
327
  if new is None:
327
328
  continue
328
329
 
329
- old_field_name = f.name if combine_extras else f.name[EXTEND_PREFIX_LEN:]
330
+ old_field_name = f.name if combine_extends else f.name[EXTEND_PREFIX_LEN:]
330
331
 
331
332
  old = getattr(self, old_field_name)
332
333
  if old is None:
@@ -352,11 +353,11 @@ class BaseOptions(ValidateMixin):
352
353
  if f.name not in base_field_names:
353
354
  continue
354
355
 
355
- if combine_extras:
356
- if "extend_" + f.name in base_field_names and getattr(config, f.name, None) is not None:
357
- setattr(self, "extend_" + f.name, None)
356
+ if combine_extends:
357
+ if EXTEND_PREFIX + f.name in base_field_names and getattr(config, f.name, None) is not None:
358
+ setattr(self, EXTEND_PREFIX + f.name, None)
358
359
 
359
- if getattr(config, f"extend_{f.name}", None) is not None and not combine_extras:
360
+ if getattr(config, f"{EXTEND_PREFIX}_{f.name}", None) is not None and not combine_extends:
360
361
  continue
361
362
 
362
363
  new = self._verified_value(f.name, getattr(config, f.name), type_hints[f.name], config)
@@ -514,6 +515,17 @@ class CommonOptions(BaseOptions):
514
515
  robot_priority=500,
515
516
  robot_short_name="i",
516
517
  )
518
+ legacy_output: Union[bool, Flag, None] = field(
519
+ description="""\
520
+ Create XML output file in format compatible with
521
+ Robot Framework 6.x and earlier.
522
+
523
+ corresponds to the `--legacyoutput` option of _robot_
524
+ """,
525
+ robot_name="legacyoutput",
526
+ robot_priority=500,
527
+ robot_is_flag=True,
528
+ )
517
529
  log: Optional[Union[str, StringExpression]] = field(
518
530
  description="""\
519
531
  HTML log file. Can be disabled by giving a special
@@ -929,7 +941,7 @@ class CommonOptions(BaseOptions):
929
941
 
930
942
 
931
943
  @dataclass
932
- class CommonExtraOptions(BaseOptions):
944
+ class CommonExtendOptions(BaseOptions):
933
945
  """Extra common options for all _robot_ commands."""
934
946
 
935
947
  extend_excludes: Optional[List[Union[str, StringExpression]]] = field(
@@ -941,7 +953,7 @@ class CommonExtraOptions(BaseOptions):
941
953
  matched using same rules as with --include.
942
954
 
943
955
  corresponds to the `-e --exclude tag *` option of _robot_
944
- """
956
+ """,
945
957
  )
946
958
  extend_expand_keywords: Optional[List[Union[str, NamePattern, TagPattern]]] = field(
947
959
  description="""\
@@ -959,7 +971,7 @@ class CommonExtraOptions(BaseOptions):
959
971
  ```
960
972
 
961
973
  corresponds to the `--expandkeywords name:<pattern>|tag:<pattern> *` option of _robot_
962
- """
974
+ """,
963
975
  )
964
976
  extend_flatten_keywords: Optional[
965
977
  List[
@@ -989,7 +1001,7 @@ class CommonExtraOptions(BaseOptions):
989
1001
  `--removekeywords tag:<pattern>`
990
1002
 
991
1003
  corresponds to the `--flattenkeywords for|while|iteration|name:<pattern>|tag:<pattern> *` option of _robot_
992
- """
1004
+ """,
993
1005
  )
994
1006
  extend_includes: Optional[List[Union[str, StringExpression]]] = field(
995
1007
  description="""\
@@ -1009,7 +1021,7 @@ class CommonExtraOptions(BaseOptions):
1009
1021
  ```
1010
1022
 
1011
1023
  corresponds to the `-i --include tag *` option of _robot_
1012
- """
1024
+ """,
1013
1025
  )
1014
1026
  extend_metadata: Optional[Dict[str, Union[str, StringExpression]]] = field(
1015
1027
  description="""\
@@ -1020,7 +1032,7 @@ class CommonExtraOptions(BaseOptions):
1020
1032
  as --doc. Example: --metadata Version:1.2
1021
1033
 
1022
1034
  corresponds to the `-M --metadata name:value *` option of _robot_
1023
- """
1035
+ """,
1024
1036
  )
1025
1037
  extend_parse_include: Optional[List[Union[str, StringExpression]]] = field(
1026
1038
  description="""\
@@ -1034,7 +1046,7 @@ class CommonExtraOptions(BaseOptions):
1034
1046
  all files in that directory, recursively.
1035
1047
 
1036
1048
  corresponds to the `-I --parseinclude pattern *` option of _robot_
1037
- """
1049
+ """,
1038
1050
  )
1039
1051
  extend_pre_rebot_modifiers: Optional[Dict[str, List[Union[str, StringExpression]]]] = field(
1040
1052
  description="""\
@@ -1045,7 +1057,7 @@ class CommonExtraOptions(BaseOptions):
1045
1057
  arguments the same way as with --listener.
1046
1058
 
1047
1059
  corresponds to the `--prerebotmodifier modifier *` option of _robot_
1048
- """
1060
+ """,
1049
1061
  )
1050
1062
  extend_python_path: Optional[List[Union[str, StringExpression]]] = field(
1051
1063
  description="""\
@@ -1066,7 +1078,7 @@ class CommonExtraOptions(BaseOptions):
1066
1078
  ```
1067
1079
 
1068
1080
  corresponds to the `-P --pythonpath path *` option of _robot_
1069
- """
1081
+ """,
1070
1082
  )
1071
1083
  extend_remove_keywords: Optional[
1072
1084
  List[
@@ -1121,7 +1133,7 @@ class CommonExtraOptions(BaseOptions):
1121
1133
  ```
1122
1134
 
1123
1135
  corresponds to the `--removekeywords all|passed|for|wuks|name:<pattern>|tag:<pattern> *` option of _robot_
1124
- """
1136
+ """,
1125
1137
  )
1126
1138
  extend_set_tag: Optional[List[Union[str, StringExpression]]] = field(
1127
1139
  description="""\
@@ -1130,7 +1142,7 @@ class CommonExtraOptions(BaseOptions):
1130
1142
  Sets given tag(s) to all executed tests.
1131
1143
 
1132
1144
  corresponds to the `-G --settag tag *` option of _robot_
1133
- """
1145
+ """,
1134
1146
  )
1135
1147
  extend_suites: Optional[List[Union[str, StringExpression]]] = field(
1136
1148
  description="""\
@@ -1145,7 +1157,7 @@ class CommonExtraOptions(BaseOptions):
1145
1157
  selects suite `Y` only if its parent is `X`.
1146
1158
 
1147
1159
  corresponds to the `-s --suite name *` option of _robot_
1148
- """
1160
+ """,
1149
1161
  )
1150
1162
  extend_tag_doc: Optional[Dict[str, Union[str, StringExpression]]] = field(
1151
1163
  description="""\
@@ -1165,7 +1177,7 @@ class CommonExtraOptions(BaseOptions):
1165
1177
  ```
1166
1178
 
1167
1179
  corresponds to the `--tagdoc pattern:doc *` option of _robot_
1168
- """
1180
+ """,
1169
1181
  )
1170
1182
  extend_tag_stat_combine: Optional[List[Union[str, Dict[str, str]]]] = field(
1171
1183
  description="""\
@@ -1185,7 +1197,7 @@ class CommonExtraOptions(BaseOptions):
1185
1197
  ```
1186
1198
 
1187
1199
  corresponds to the `--tagstatcombine tags:name *` option of _robot_
1188
- """
1200
+ """,
1189
1201
  )
1190
1202
  extend_tag_stat_exclude: Optional[List[Union[str, StringExpression]]] = field(
1191
1203
  description="""\
@@ -1196,7 +1208,7 @@ class CommonExtraOptions(BaseOptions):
1196
1208
  similarly as --exclude is used with --include.
1197
1209
 
1198
1210
  corresponds to the `--tagstatexclude tag *` option of _robot_
1199
- """
1211
+ """,
1200
1212
  )
1201
1213
  extend_tag_stat_include: Optional[List[Union[str, StringExpression]]] = field(
1202
1214
  description="""\
@@ -1207,7 +1219,7 @@ class CommonExtraOptions(BaseOptions):
1207
1219
  Given tag can be a pattern like with --include.
1208
1220
 
1209
1221
  corresponds to the `--tagstatinclude tag *` option of _robot_
1210
- """
1222
+ """,
1211
1223
  )
1212
1224
  extend_tag_stat_link: Optional[Dict[str, Union[str, StringExpression]]] = field(
1213
1225
  description="""\
@@ -1227,7 +1239,7 @@ class CommonExtraOptions(BaseOptions):
1227
1239
  ```
1228
1240
 
1229
1241
  corresponds to the `--tagstatlink pattern:link:title *` option of _robot_
1230
- """
1242
+ """,
1231
1243
  )
1232
1244
  extend_tasks: Optional[List[Union[str, StringExpression]]] = field(
1233
1245
  description="""\
@@ -1236,7 +1248,7 @@ class CommonExtraOptions(BaseOptions):
1236
1248
  Alias to --test. Especially applicable with --rpa.
1237
1249
 
1238
1250
  corresponds to the `--task name *` option of _robot_
1239
- """
1251
+ """,
1240
1252
  )
1241
1253
  extend_tests: Optional[List[Union[str, StringExpression]]] = field(
1242
1254
  description="""\
@@ -1250,7 +1262,7 @@ class CommonExtraOptions(BaseOptions):
1250
1262
  in brackets.
1251
1263
 
1252
1264
  corresponds to the `-t --test name *` option of _robot_
1253
- """
1265
+ """,
1254
1266
  )
1255
1267
 
1256
1268
 
@@ -1623,7 +1635,7 @@ class RobotOptions(BaseOptions):
1623
1635
 
1624
1636
 
1625
1637
  @dataclass
1626
- class RobotExtraOptions(BaseOptions):
1638
+ class RobotExtendOptions(BaseOptions):
1627
1639
  """Extra options for _robot_ command."""
1628
1640
 
1629
1641
  extend_languages: Optional[List[Union[str, StringExpression]]] = field(
@@ -1635,7 +1647,7 @@ class RobotExtraOptions(BaseOptions):
1635
1647
  a custom language file.
1636
1648
 
1637
1649
  corresponds to the `--language lang *` option of _rebot_
1638
- """
1650
+ """,
1639
1651
  )
1640
1652
  extend_listeners: Optional[Dict[str, List[Union[str, StringExpression]]]] = field(
1641
1653
  description="""\
@@ -1654,7 +1666,7 @@ class RobotExtraOptions(BaseOptions):
1654
1666
  ```
1655
1667
 
1656
1668
  corresponds to the `--listener listener *` option of _rebot_
1657
- """
1669
+ """,
1658
1670
  )
1659
1671
  extend_parsers: Optional[Dict[str, List[Union[str, StringExpression]]]] = field(
1660
1672
  description="""\
@@ -1664,7 +1676,7 @@ class RobotExtraOptions(BaseOptions):
1664
1676
  arguments the same way as with --listener.
1665
1677
 
1666
1678
  corresponds to the `--parser parser *` option of _rebot_
1667
- """
1679
+ """,
1668
1680
  )
1669
1681
  extend_pre_run_modifiers: Optional[Dict[str, List[Union[str, StringExpression]]]] = field(
1670
1682
  description="""\
@@ -1675,7 +1687,7 @@ class RobotExtraOptions(BaseOptions):
1675
1687
  same way as with --listener.
1676
1688
 
1677
1689
  corresponds to the `--prerunmodifier modifier *` option of _rebot_
1678
- """
1690
+ """,
1679
1691
  )
1680
1692
  extend_skip: Optional[List[Union[str, StringExpression]]] = field(
1681
1693
  description="""\
@@ -1685,7 +1697,7 @@ class RobotExtraOptions(BaseOptions):
1685
1697
  a pattern.
1686
1698
 
1687
1699
  corresponds to the `--skip tag *` option of _rebot_
1688
- """
1700
+ """,
1689
1701
  )
1690
1702
  extend_skip_on_failure: Optional[List[Union[str, StringExpression]]] = field(
1691
1703
  description="""\
@@ -1695,7 +1707,7 @@ class RobotExtraOptions(BaseOptions):
1695
1707
  Tag can be a pattern
1696
1708
 
1697
1709
  corresponds to the `--skiponfailure tag *` option of _rebot_
1698
- """
1710
+ """,
1699
1711
  )
1700
1712
  extend_variables: Optional[Dict[str, Union[str, StringExpression]]] = field(
1701
1713
  description="""\
@@ -1715,7 +1727,7 @@ class RobotExtraOptions(BaseOptions):
1715
1727
  ```
1716
1728
 
1717
1729
  corresponds to the `-v --variable name:value *` option of _rebot_
1718
- """
1730
+ """,
1719
1731
  )
1720
1732
  extend_variable_files: Optional[List[Union[str, StringExpression]]] = field(
1721
1733
  description="""\
@@ -1733,7 +1745,7 @@ class RobotExtraOptions(BaseOptions):
1733
1745
  ```
1734
1746
 
1735
1747
  corresponds to the `-V --variablefile path *` option of _rebot_
1736
- """
1748
+ """,
1737
1749
  )
1738
1750
 
1739
1751
 
@@ -1924,7 +1936,7 @@ class LibDocOptions(BaseOptions):
1924
1936
 
1925
1937
 
1926
1938
  @dataclass
1927
- class LibDocExtraOptions(BaseOptions):
1939
+ class LibDocExtendOptions(BaseOptions):
1928
1940
  """Extra options for _libdoc_ command."""
1929
1941
 
1930
1942
  extend_python_path: Optional[List[Union[str, StringExpression]]] = field(
@@ -1935,7 +1947,7 @@ class LibDocExtraOptions(BaseOptions):
1935
1947
  and resources.
1936
1948
 
1937
1949
  corresponds to the `-P --pythonpath path *` option of _libdoc_
1938
- """
1950
+ """,
1939
1951
  )
1940
1952
 
1941
1953
 
@@ -2038,7 +2050,7 @@ class TestDocOptions(BaseOptions):
2038
2050
 
2039
2051
 
2040
2052
  @dataclass
2041
- class TestDocExtraOptions(BaseOptions):
2053
+ class TestDocExtendOptions(BaseOptions):
2042
2054
  """Extra options for _testdoc_ command."""
2043
2055
 
2044
2056
  extend_excludes: Optional[List[Union[str, StringExpression]]] = field(
@@ -2048,7 +2060,7 @@ class TestDocExtraOptions(BaseOptions):
2048
2060
  Exclude tests by tags.
2049
2061
 
2050
2062
  corresponds to the `-e --exclude tag *` option of _testdoc_
2051
- """
2063
+ """,
2052
2064
  )
2053
2065
  extend_includes: Optional[List[Union[str, StringExpression]]] = field(
2054
2066
  description="""\
@@ -2057,7 +2069,7 @@ class TestDocExtraOptions(BaseOptions):
2057
2069
  Include tests by tags.
2058
2070
 
2059
2071
  corresponds to the `-i --include tag *` option of _testdoc_
2060
- """
2072
+ """,
2061
2073
  )
2062
2074
  extend_metadata: Optional[Dict[str, Union[str, StringExpression]]] = field(
2063
2075
  description="""\
@@ -2066,7 +2078,7 @@ class TestDocExtraOptions(BaseOptions):
2066
2078
  Set/override metadata of the top level suite.
2067
2079
 
2068
2080
  corresponds to the `-M --metadata name:value *` option of _testdoc_
2069
- """
2081
+ """,
2070
2082
  )
2071
2083
  extend_set_tag: Optional[List[Union[str, StringExpression]]] = field(
2072
2084
  description="""\
@@ -2075,7 +2087,7 @@ class TestDocExtraOptions(BaseOptions):
2075
2087
  Set given tag(s) to all test cases.
2076
2088
 
2077
2089
  corresponds to the `-G --settag tag *` option of _testdoc_
2078
- """
2090
+ """,
2079
2091
  )
2080
2092
  extend_suites: Optional[List[Union[str, StringExpression]]] = field(
2081
2093
  description="""\
@@ -2084,7 +2096,7 @@ class TestDocExtraOptions(BaseOptions):
2084
2096
  Include suites by name.
2085
2097
 
2086
2098
  corresponds to the `-s --suite name *` option of _testdoc_
2087
- """
2099
+ """,
2088
2100
  )
2089
2101
  extend_tests: Optional[List[Union[str, StringExpression]]] = field(
2090
2102
  description="""\
@@ -2093,7 +2105,7 @@ class TestDocExtraOptions(BaseOptions):
2093
2105
  Include tests by name.
2094
2106
 
2095
2107
  corresponds to the `-t --test name *` option of _testdoc_
2096
- """
2108
+ """,
2097
2109
  )
2098
2110
 
2099
2111
 
@@ -2101,22 +2113,22 @@ class TestDocExtraOptions(BaseOptions):
2101
2113
 
2102
2114
 
2103
2115
  @dataclass
2104
- class RebotProfile(RebotOptions, CommonOptions, CommonExtraOptions):
2116
+ class RebotProfile(RebotOptions, CommonOptions, CommonExtendOptions):
2105
2117
  """Profile for _rebot_ command."""
2106
2118
 
2107
2119
 
2108
2120
  @dataclass
2109
- class LibDocProfile(LibDocOptions, LibDocExtraOptions):
2121
+ class LibDocProfile(LibDocOptions, LibDocExtendOptions):
2110
2122
  """Profile for _libdoc_ command."""
2111
2123
 
2112
2124
 
2113
2125
  @dataclass
2114
- class TestDocProfile(TestDocOptions, TestDocExtraOptions):
2126
+ class TestDocProfile(TestDocOptions, TestDocExtendOptions):
2115
2127
  """Profile for _testdoc_ command."""
2116
2128
 
2117
2129
 
2118
2130
  @dataclass
2119
- class RobotBaseProfile(CommonOptions, CommonExtraOptions, RobotOptions, RobotExtraOptions):
2131
+ class RobotBaseProfile(CommonOptions, CommonExtendOptions, RobotOptions, RobotExtendOptions):
2120
2132
  """Base profile for Robot Framework."""
2121
2133
 
2122
2134
  args: Optional[List[str]] = field(
@@ -2342,7 +2354,7 @@ class RobotConfig(RobotExtraBaseProfile):
2342
2354
  result = RobotBaseProfile()
2343
2355
 
2344
2356
  for f in dataclasses.fields(profile):
2345
- if f.name.startswith("extend_"):
2357
+ if f.name.startswith(EXTEND_PREFIX):
2346
2358
  new = self._verified_value(
2347
2359
  f.name,
2348
2360
  getattr(profile, f.name),
@@ -2373,7 +2385,7 @@ class RobotConfig(RobotExtraBaseProfile):
2373
2385
  if f.name not in base_field_names:
2374
2386
  continue
2375
2387
 
2376
- if getattr(profile, f"extend_{f.name}", None) is not None:
2388
+ if getattr(profile, f"{EXTEND_PREFIX}_{f.name}", None) is not None:
2377
2389
  continue
2378
2390
 
2379
2391
  new = self._verified_value(