robotframework 6.1.1__zip → 7.0__zip

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.
Files changed (307) hide show
  1. {robotframework-6.1.1 → robotframework-7.0}/INSTALL.rst +25 -25
  2. {robotframework-6.1.1 → robotframework-7.0}/PKG-INFO +6 -8
  3. {robotframework-6.1.1 → robotframework-7.0}/README.rst +3 -2
  4. {robotframework-6.1.1 → robotframework-7.0}/setup.py +3 -6
  5. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/__init__.py +4 -1
  6. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/deco.py +60 -14
  7. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/exceptions.py +6 -6
  8. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/interfaces.py +402 -67
  9. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/logger.py +27 -20
  10. {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/parsing.py +4 -2
  11. robotframework-7.0/src/robot/api/py.typed +0 -0
  12. {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/gatherfailed.py +2 -2
  13. {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/languages.py +0 -9
  14. {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/settings.py +21 -14
  15. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/storage.js +11 -6
  16. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/htmlfilewriter.py +1 -1
  17. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.css +10 -2
  18. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.html +10 -0
  19. robotframework-7.0/src/robot/htmldata/rebot/common.css +362 -0
  20. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/doc_formatting.css +13 -7
  21. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.css +51 -10
  22. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.html +14 -23
  23. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/model.js +2 -4
  24. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/report.css +83 -19
  25. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/report.html +22 -7
  26. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/testdata.js +10 -3
  27. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/view.js +84 -0
  28. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/template.py +3 -3
  29. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/builder.py +0 -8
  30. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/datatypes.py +9 -10
  31. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/htmlutils.py +4 -7
  32. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/jsonbuilder.py +38 -20
  33. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/model.py +21 -28
  34. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/robotbuilder.py +50 -31
  35. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/standardtypes.py +9 -1
  36. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/xmlbuilder.py +35 -20
  37. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/xmlwriter.py +18 -38
  38. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/BuiltIn.py +255 -205
  39. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Collections.py +384 -240
  40. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/DateTime.py +73 -60
  41. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/OperatingSystem.py +6 -5
  42. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Process.py +26 -27
  43. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Remote.py +40 -36
  44. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/String.py +66 -76
  45. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/XML.py +66 -59
  46. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/__init__.py +2 -2
  47. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/__init__.py +5 -5
  48. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/body.py +44 -13
  49. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/configurer.py +15 -11
  50. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/control.py +226 -84
  51. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/filter.py +31 -25
  52. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/itemlist.py +9 -8
  53. robotframework-7.0/src/robot/model/keyword.py +77 -0
  54. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/message.py +19 -10
  55. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/modelobject.py +25 -7
  56. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/namepatterns.py +3 -25
  57. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/stats.py +9 -15
  58. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tags.py +1 -1
  59. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/testcase.py +15 -27
  60. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/testsuite.py +17 -26
  61. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/visitor.py +35 -8
  62. robotframework-7.0/src/robot/output/console/dotted.py +90 -0
  63. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/quiet.py +3 -2
  64. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/verbose.py +61 -61
  65. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/debugfile.py +39 -24
  66. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/filelogger.py +18 -15
  67. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/librarylogger.py +3 -2
  68. robotframework-7.0/src/robot/output/listeners.py +753 -0
  69. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/logger.py +216 -80
  70. robotframework-7.0/src/robot/output/loggerapi.py +215 -0
  71. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/loggerhelper.py +23 -56
  72. robotframework-7.0/src/robot/output/output.py +185 -0
  73. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/stdoutlogsplitter.py +8 -5
  74. robotframework-7.0/src/robot/output/xmllogger.py +459 -0
  75. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/blocklexers.py +17 -13
  76. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/context.py +12 -2
  77. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/lexer.py +1 -1
  78. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/settings.py +6 -3
  79. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/statementlexers.py +39 -10
  80. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/tokens.py +27 -29
  81. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/blocks.py +19 -6
  82. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/statements.py +193 -94
  83. robotframework-7.0/src/robot/parsing/model/visitor.py +100 -0
  84. {robotframework-6.1.1 → robotframework-7.0}/src/robot/rebot.py +2 -0
  85. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/expandkeywordmatcher.py +1 -1
  86. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsbuildingcontext.py +8 -6
  87. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsmodelbuilders.py +88 -61
  88. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/logreportwriters.py +16 -10
  89. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/outputwriter.py +18 -2
  90. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/resultwriter.py +4 -4
  91. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/stringcache.py +3 -3
  92. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/xunitwriter.py +15 -21
  93. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/__init__.py +3 -2
  94. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/configurer.py +12 -9
  95. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/executionresult.py +56 -8
  96. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/flattenkeywordmatcher.py +48 -9
  97. robotframework-7.0/src/robot/result/keywordremover.py +207 -0
  98. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/merger.py +1 -1
  99. robotframework-7.0/src/robot/result/model.py +1185 -0
  100. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/modeldeprecation.py +9 -3
  101. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/resultbuilder.py +46 -36
  102. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/xmlelementhandlers.py +83 -43
  103. {robotframework-6.1.1 → robotframework-7.0}/src/robot/run.py +2 -0
  104. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/__init__.py +14 -4
  105. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/__init__.py +2 -1
  106. robotframework-7.0/src/robot/running/arguments/argumentconverter.py +100 -0
  107. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentmapper.py +26 -24
  108. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentparser.py +82 -60
  109. robotframework-7.0/src/robot/running/arguments/argumentresolver.py +158 -0
  110. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentspec.py +83 -116
  111. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentvalidator.py +33 -27
  112. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/customconverters.py +15 -12
  113. robotframework-7.0/src/robot/running/arguments/embedded.py +145 -0
  114. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/typeconverters.py +233 -213
  115. robotframework-7.0/src/robot/running/arguments/typeinfo.py +317 -0
  116. robotframework-7.0/src/robot/running/arguments/typeinfoparser.py +219 -0
  117. robotframework-7.0/src/robot/running/arguments/typevalidator.py +60 -0
  118. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/bodyrunner.py +147 -129
  119. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/builders.py +2 -1
  120. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/parsers.py +10 -11
  121. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/settings.py +9 -17
  122. robotframework-7.0/src/robot/running/builder/transformers.py +535 -0
  123. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/context.py +113 -31
  124. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/dynamicmethods.py +62 -34
  125. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/importer.py +27 -49
  126. robotframework-7.0/src/robot/running/invalidkeyword.py +67 -0
  127. robotframework-7.0/src/robot/running/keywordfinder.py +91 -0
  128. robotframework-7.0/src/robot/running/keywordimplementation.py +164 -0
  129. robotframework-7.0/src/robot/running/librarykeyword.py +392 -0
  130. robotframework-7.0/src/robot/running/librarykeywordrunner.py +250 -0
  131. robotframework-7.0/src/robot/running/libraryscopes.py +115 -0
  132. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/model.py +195 -377
  133. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/namespace.py +124 -137
  134. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/outputcapture.py +20 -12
  135. robotframework-7.0/src/robot/running/resourcemodel.py +448 -0
  136. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/statusreporter.py +16 -13
  137. robotframework-7.0/src/robot/running/suiterunner.py +265 -0
  138. robotframework-7.0/src/robot/running/testlibraries.py +500 -0
  139. robotframework-7.0/src/robot/running/userkeywordrunner.py +260 -0
  140. {robotframework-6.1.1 → robotframework-7.0}/src/robot/testdoc.py +18 -13
  141. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/__init__.py +53 -35
  142. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/connectioncache.py +64 -59
  143. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/dotdict.py +3 -0
  144. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/encodingsniffer.py +1 -1
  145. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/escaping.py +19 -19
  146. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/importer.py +2 -2
  147. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/markupwriters.py +23 -15
  148. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/misc.py +1 -2
  149. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/normalizing.py +9 -24
  150. robotframework-7.0/src/robot/utils/notset.py +33 -0
  151. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/platform.py +15 -5
  152. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotio.py +9 -9
  153. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotpath.py +1 -0
  154. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robottime.py +122 -90
  155. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robottypes.py +21 -31
  156. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/setter.py +0 -5
  157. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/text.py +7 -4
  158. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/unic.py +2 -2
  159. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/__init__.py +2 -2
  160. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/assigner.py +17 -19
  161. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/evaluation.py +20 -17
  162. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/filesetter.py +80 -80
  163. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/replacer.py +33 -36
  164. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/scopes.py +17 -12
  165. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/search.py +66 -41
  166. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/store.py +14 -16
  167. robotframework-7.0/src/robot/variables/tablesetter.py +164 -0
  168. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/variables.py +1 -1
  169. {robotframework-6.1.1 → robotframework-7.0}/src/robot/version.py +1 -1
  170. {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/PKG-INFO +6 -8
  171. {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/SOURCES.txt +10 -8
  172. {robotframework-6.1.1 → robotframework-7.0}/tasks.py +6 -6
  173. robotframework-6.1.1/src/robot/htmldata/rebot/common.css +0 -239
  174. robotframework-6.1.1/src/robot/libraries/Reserved.py +0 -48
  175. robotframework-6.1.1/src/robot/model/keyword.py +0 -173
  176. robotframework-6.1.1/src/robot/output/console/dotted.py +0 -90
  177. robotframework-6.1.1/src/robot/output/listenerarguments.py +0 -165
  178. robotframework-6.1.1/src/robot/output/listenermethods.py +0 -113
  179. robotframework-6.1.1/src/robot/output/listeners.py +0 -174
  180. robotframework-6.1.1/src/robot/output/output.py +0 -95
  181. robotframework-6.1.1/src/robot/output/xmllogger.py +0 -354
  182. robotframework-6.1.1/src/robot/parsing/model/visitor.py +0 -67
  183. robotframework-6.1.1/src/robot/result/keywordremover.py +0 -183
  184. robotframework-6.1.1/src/robot/result/model.py +0 -957
  185. robotframework-6.1.1/src/robot/running/arguments/argumentconverter.py +0 -79
  186. robotframework-6.1.1/src/robot/running/arguments/argumentresolver.py +0 -131
  187. robotframework-6.1.1/src/robot/running/arguments/embedded.py +0 -146
  188. robotframework-6.1.1/src/robot/running/arguments/typevalidator.py +0 -56
  189. robotframework-6.1.1/src/robot/running/builder/transformers.py +0 -642
  190. robotframework-6.1.1/src/robot/running/handlers.py +0 -321
  191. robotframework-6.1.1/src/robot/running/handlerstore.py +0 -66
  192. robotframework-6.1.1/src/robot/running/librarykeywordrunner.py +0 -238
  193. robotframework-6.1.1/src/robot/running/libraryscopes.py +0 -97
  194. robotframework-6.1.1/src/robot/running/modelcombiner.py +0 -32
  195. robotframework-6.1.1/src/robot/running/suiterunner.py +0 -248
  196. robotframework-6.1.1/src/robot/running/testlibraries.py +0 -423
  197. robotframework-6.1.1/src/robot/running/usererrorhandler.py +0 -75
  198. robotframework-6.1.1/src/robot/running/userkeyword.py +0 -111
  199. robotframework-6.1.1/src/robot/running/userkeywordrunner.py +0 -274
  200. robotframework-6.1.1/src/robot/variables/tablesetter.py +0 -156
  201. {robotframework-6.1.1 → robotframework-7.0}/AUTHORS.rst +0 -0
  202. {robotframework-6.1.1 → robotframework-7.0}/BUILD.rst +0 -0
  203. {robotframework-6.1.1 → robotframework-7.0}/CONTRIBUTING.rst +0 -0
  204. {robotframework-6.1.1 → robotframework-7.0}/COPYRIGHT.txt +0 -0
  205. {robotframework-6.1.1 → robotframework-7.0}/LICENSE.txt +0 -0
  206. {robotframework-6.1.1 → robotframework-7.0}/MANIFEST.in +0 -0
  207. {robotframework-6.1.1 → robotframework-7.0}/setup.cfg +0 -0
  208. {robotframework-6.1.1 → robotframework-7.0}/src/robot/__init__.py +0 -0
  209. {robotframework-6.1.1 → robotframework-7.0}/src/robot/__main__.py +0 -0
  210. {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/__init__.py +0 -0
  211. {robotframework-6.1.1 → robotframework-7.0}/src/robot/errors.py +0 -0
  212. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/__init__.py +0 -0
  213. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/__init__.py +0 -0
  214. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/js_disabled.css +0 -0
  215. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/jsonwriter.py +0 -0
  216. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/__init__.py +0 -0
  217. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
  218. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.min.js +0 -0
  219. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
  220. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
  221. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
  222. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/__init__.py +0 -0
  223. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
  224. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/print.css +0 -0
  225. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/pygments.css +0 -0
  226. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/__init__.py +0 -0
  227. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/fileloading.js +0 -0
  228. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.js +0 -0
  229. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/print.css +0 -0
  230. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/util.js +0 -0
  231. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/__init__.py +0 -0
  232. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.css +0 -0
  233. {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.html +0 -0
  234. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdoc.py +0 -0
  235. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/__init__.py +0 -0
  236. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/consoleviewer.py +0 -0
  237. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/htmlwriter.py +0 -0
  238. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/jsonwriter.py +0 -0
  239. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/output.py +0 -0
  240. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/writer.py +0 -0
  241. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Dialogs.py +0 -0
  242. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Easter.py +0 -0
  243. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Screenshot.py +0 -0
  244. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Telnet.py +0 -0
  245. {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/dialogs_py.py +0 -0
  246. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/fixture.py +0 -0
  247. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/metadata.py +0 -0
  248. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/modifier.py +0 -0
  249. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/statistics.py +0 -0
  250. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/suitestatistics.py +0 -0
  251. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tagsetter.py +0 -0
  252. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tagstatistics.py +0 -0
  253. {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/totalstatistics.py +0 -0
  254. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/__init__.py +0 -0
  255. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/__init__.py +0 -0
  256. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/highlighting.py +0 -0
  257. {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/pyloggingconf.py +0 -0
  258. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/__init__.py +0 -0
  259. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/__init__.py +0 -0
  260. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/tokenizer.py +0 -0
  261. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/__init__.py +0 -0
  262. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/__init__.py +0 -0
  263. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/blockparsers.py +0 -0
  264. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/fileparser.py +0 -0
  265. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/parser.py +0 -0
  266. {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/suitestructure.py +0 -0
  267. {robotframework-6.1.1 → robotframework-7.0}/src/robot/pythonpathsetter.py +0 -0
  268. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/__init__.py +0 -0
  269. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsexecutionresult.py +0 -0
  270. {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jswriter.py +0 -0
  271. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/executionerrors.py +0 -0
  272. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/messagefilter.py +0 -0
  273. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/suiteteardownfailed.py +0 -0
  274. {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/visitor.py +0 -0
  275. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/__init__.py +0 -0
  276. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/randomizer.py +0 -0
  277. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/runkwregister.py +0 -0
  278. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/signalhandler.py +0 -0
  279. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/status.py +0 -0
  280. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/__init__.py +0 -0
  281. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/posix.py +0 -0
  282. {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/windows.py +0 -0
  283. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/application.py +0 -0
  284. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/argumentparser.py +0 -0
  285. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/asserts.py +0 -0
  286. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/charwidth.py +0 -0
  287. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/compress.py +0 -0
  288. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/encoding.py +0 -0
  289. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/error.py +0 -0
  290. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/etreewrapper.py +0 -0
  291. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/filereader.py +0 -0
  292. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/frange.py +0 -0
  293. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/htmlformatters.py +0 -0
  294. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/markuputils.py +0 -0
  295. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/match.py +0 -0
  296. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/recommendations.py +0 -0
  297. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/restreader.py +0 -0
  298. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotenv.py +0 -0
  299. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotinspect.py +0 -0
  300. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/sortable.py +0 -0
  301. {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/typehints.py +0 -0
  302. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/finders.py +0 -0
  303. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/notfound.py +0 -0
  304. {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/resolvable.py +0 -0
  305. {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/dependency_links.txt +0 -0
  306. {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/entry_points.txt +0 -0
  307. {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/top_level.txt +0 -0
@@ -29,8 +29,9 @@ from .statementlexers import (BreakLexer, CommentLexer, CommentSectionHeaderLexe
29
29
  KeywordSettingLexer, Lexer, ReturnLexer, SettingLexer,
30
30
  SettingSectionHeaderLexer, SyntaxErrorLexer,
31
31
  TaskSectionHeaderLexer, TestCaseSectionHeaderLexer,
32
- TestCaseSettingLexer, TryHeaderLexer, VariableLexer,
33
- VariableSectionHeaderLexer, WhileHeaderLexer)
32
+ TestCaseSettingLexer, TryHeaderLexer, VarLexer,
33
+ VariableLexer, VariableSectionHeaderLexer,
34
+ WhileHeaderLexer)
34
35
  from .tokens import StatementTokens, Token
35
36
 
36
37
 
@@ -200,8 +201,8 @@ class TestCaseLexer(TestOrKeywordLexer):
200
201
  self._lex_with_priority(priority=TestCaseSettingLexer)
201
202
 
202
203
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
203
- return (TestCaseSettingLexer, ForLexer, InlineIfLexer, IfLexer,
204
- TryLexer, WhileLexer, SyntaxErrorLexer, KeywordCallLexer)
204
+ return (TestCaseSettingLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer,
205
+ WhileLexer, VarLexer, SyntaxErrorLexer, KeywordCallLexer)
205
206
 
206
207
 
207
208
  class KeywordLexer(TestOrKeywordLexer):
@@ -211,8 +212,8 @@ class KeywordLexer(TestOrKeywordLexer):
211
212
  super().__init__(ctx.keyword_context())
212
213
 
213
214
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
214
- return (KeywordSettingLexer, ForLexer, InlineIfLexer, IfLexer, ReturnLexer,
215
- TryLexer, WhileLexer, SyntaxErrorLexer, KeywordCallLexer)
215
+ return (KeywordSettingLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer,
216
+ WhileLexer, VarLexer, ReturnLexer, SyntaxErrorLexer, KeywordCallLexer)
216
217
 
217
218
 
218
219
  class NestedBlockLexer(BlockLexer, ABC):
@@ -242,7 +243,8 @@ class ForLexer(NestedBlockLexer):
242
243
 
243
244
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
244
245
  return (ForHeaderLexer, InlineIfLexer, IfLexer, TryLexer, WhileLexer, EndLexer,
245
- ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
246
+ VarLexer, ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
247
+ KeywordCallLexer)
246
248
 
247
249
 
248
250
  class WhileLexer(NestedBlockLexer):
@@ -252,7 +254,8 @@ class WhileLexer(NestedBlockLexer):
252
254
 
253
255
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
254
256
  return (WhileHeaderLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer, EndLexer,
255
- ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
257
+ VarLexer, ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
258
+ KeywordCallLexer)
256
259
 
257
260
 
258
261
  class TryLexer(NestedBlockLexer):
@@ -262,8 +265,9 @@ class TryLexer(NestedBlockLexer):
262
265
 
263
266
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
264
267
  return (TryHeaderLexer, ExceptHeaderLexer, ElseHeaderLexer, FinallyHeaderLexer,
265
- ForLexer, InlineIfLexer, IfLexer, WhileLexer, EndLexer, ReturnLexer,
266
- BreakLexer, ContinueLexer, SyntaxErrorLexer, KeywordCallLexer)
268
+ ForLexer, InlineIfLexer, IfLexer, WhileLexer, EndLexer, VarLexer,
269
+ ReturnLexer, BreakLexer, ContinueLexer, SyntaxErrorLexer,
270
+ KeywordCallLexer)
267
271
 
268
272
 
269
273
  class IfLexer(NestedBlockLexer):
@@ -273,8 +277,8 @@ class IfLexer(NestedBlockLexer):
273
277
 
274
278
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
275
279
  return (InlineIfLexer, IfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer,
276
- ForLexer, TryLexer, WhileLexer, EndLexer, ReturnLexer, ContinueLexer,
277
- BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
280
+ ForLexer, TryLexer, WhileLexer, EndLexer, VarLexer, ReturnLexer,
281
+ ContinueLexer, BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
278
282
 
279
283
 
280
284
  class InlineIfLexer(NestedBlockLexer):
@@ -288,7 +292,7 @@ class InlineIfLexer(NestedBlockLexer):
288
292
  return False
289
293
 
290
294
  def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
291
- return (InlineIfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer,
295
+ return (InlineIfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer, VarLexer,
292
296
  ReturnLexer, ContinueLexer, BreakLexer, KeywordCallLexer)
293
297
 
294
298
  def input(self, statement: StatementTokens):
@@ -76,8 +76,18 @@ class FileContext(LexingContext):
76
76
 
77
77
  def _handles_section(self, statement: StatementTokens, header: str) -> bool:
78
78
  marker = statement[0].value
79
- return bool(marker and marker[0] == '*' and
80
- self.languages.headers.get(self._normalize(marker)) == header)
79
+ if not marker or marker[0] != '*':
80
+ return False
81
+ normalized = self._normalize(marker)
82
+ if self.languages.headers.get(normalized) == header:
83
+ return True
84
+ if normalized == header[:-1]:
85
+ statement[0].error = (
86
+ f"Singular section headers like '{marker}' are deprecated. "
87
+ f"Use plural format like '*** {header} ***' instead."
88
+ )
89
+ return True
90
+ return False
81
91
 
82
92
  def _normalize(self, marker: str) -> str:
83
93
  return normalize_whitespace(marker).strip('* ').title()
@@ -128,7 +128,7 @@ class Lexer:
128
128
 
129
129
  def _get_tokens(self, statements: 'Iterable[list[Token]]') -> 'Iterator[Token]':
130
130
  if self.data_only:
131
- ignored_types = {None, Token.COMMENT_HEADER, Token.COMMENT}
131
+ ignored_types = {None, Token.COMMENT}
132
132
  else:
133
133
  ignored_types = {None}
134
134
  inline_if_type = Token.INLINE_IF
@@ -112,8 +112,7 @@ class Settings(ABC):
112
112
  token.type = Token.COMMENT
113
113
 
114
114
  def _lex_setting(self, statement: StatementTokens, name: str):
115
- # TODO: Change token type from 'FORCE TAGS' to 'TEST TAGS' in RF 7.0.
116
- statement[0].type = {'Test Tags': Token.FORCE_TAGS,
115
+ statement[0].type = {'Test Tags': Token.TEST_TAGS,
117
116
  'Name': Token.SUITE_NAME}.get(name, name.upper())
118
117
  self.settings[name] = values = statement[1:]
119
118
  if name in self.name_and_arguments:
@@ -122,6 +121,9 @@ class Settings(ABC):
122
121
  self._lex_name_arguments_and_with_name(values)
123
122
  else:
124
123
  self._lex_arguments(values)
124
+ if name == 'Return':
125
+ statement[0].error = ("The '[Return]' setting is deprecated. "
126
+ "Use the 'RETURN' statement instead.")
125
127
 
126
128
  def _lex_name_and_arguments(self, tokens: StatementTokens):
127
129
  if tokens:
@@ -132,7 +134,7 @@ class Settings(ABC):
132
134
  self._lex_name_and_arguments(tokens)
133
135
  if len(tokens) > 1 and \
134
136
  normalize_whitespace(tokens[-2].value) in ('WITH NAME', 'AS'):
135
- tokens[-2].type = Token.WITH_NAME
137
+ tokens[-2].type = Token.AS
136
138
  tokens[-1].type = Token.NAME
137
139
 
138
140
  def _lex_arguments(self, tokens: StatementTokens):
@@ -257,6 +259,7 @@ class KeywordSettings(Settings):
257
259
  names = (
258
260
  'Documentation',
259
261
  'Arguments',
262
+ 'Setup',
260
263
  'Teardown',
261
264
  'Timeout',
262
265
  'Tags',
@@ -14,7 +14,6 @@
14
14
  # limitations under the License.
15
15
 
16
16
  from abc import ABC, abstractmethod
17
- from typing import List
18
17
 
19
18
  from robot.errors import DataError
20
19
  from robot.utils import normalize_whitespace
@@ -58,14 +57,20 @@ class StatementLexer(Lexer, ABC):
58
57
  def input(self, statement: StatementTokens):
59
58
  self.statement = statement
60
59
 
60
+ @abstractmethod
61
61
  def lex(self):
62
62
  raise NotImplementedError
63
63
 
64
64
  def _lex_options(self, *names: str, end_index: 'int|None' = None):
65
+ seen = set()
65
66
  for token in reversed(self.statement[:end_index]):
66
- if not token.value.startswith(names):
67
- break
68
- token.type = Token.OPTION
67
+ if '=' in token.value:
68
+ name = token.value.split('=')[0]
69
+ if name in names and name not in seen:
70
+ token.type = Token.OPTION
71
+ seen.add(name)
72
+ continue
73
+ break
69
74
 
70
75
 
71
76
  class SingleType(StatementLexer, ABC):
@@ -181,6 +186,11 @@ class VariableLexer(TypeAndArguments):
181
186
  ctx: FileContext
182
187
  token_type = Token.VARIABLE
183
188
 
189
+ def lex(self):
190
+ super().lex()
191
+ if self.statement[0].value[:1] == '$':
192
+ self._lex_options('separator')
193
+
184
194
 
185
195
  class KeywordCallLexer(StatementLexer):
186
196
  ctx: 'TestCaseContext|KeywordContext'
@@ -200,7 +210,8 @@ class KeywordCallLexer(StatementLexer):
200
210
  for token in self.statement:
201
211
  if keyword_seen:
202
212
  token.type = Token.ARGUMENT
203
- elif is_assign(token.value, allow_assign_mark=True, allow_items=True):
213
+ elif is_assign(token.value, allow_assign_mark=True, allow_nested=True,
214
+ allow_items=True):
204
215
  token.type = Token.ASSIGN
205
216
  else:
206
217
  token.type = Token.KEYWORD
@@ -225,9 +236,9 @@ class ForHeaderLexer(StatementLexer):
225
236
  else:
226
237
  token.type = Token.VARIABLE
227
238
  if separator == 'IN ENUMERATE':
228
- self._lex_options('start=')
239
+ self._lex_options('start')
229
240
  elif separator == 'IN ZIP':
230
- self._lex_options('mode=', 'fill=')
241
+ self._lex_options('mode', 'fill')
231
242
 
232
243
 
233
244
  class IfHeaderLexer(TypeAndArguments):
@@ -244,7 +255,8 @@ class InlineIfHeaderLexer(StatementLexer):
244
255
  for token in statement:
245
256
  if token.value == 'IF':
246
257
  return True
247
- if not is_assign(token.value, allow_assign_mark=True, allow_items=True):
258
+ if not is_assign(token.value, allow_assign_mark=True, allow_nested=True,
259
+ allow_items=True):
248
260
  return False
249
261
  return False
250
262
 
@@ -298,7 +310,7 @@ class ExceptHeaderLexer(StatementLexer):
298
310
  token.type = Token.VARIABLE
299
311
  else:
300
312
  token.type = Token.ARGUMENT
301
- self._lex_options('type=', end_index=as_index)
313
+ self._lex_options('type', end_index=as_index)
302
314
 
303
315
 
304
316
  class FinallyHeaderLexer(TypeAndArguments):
@@ -318,7 +330,7 @@ class WhileHeaderLexer(StatementLexer):
318
330
  self.statement[0].type = Token.WHILE
319
331
  for token in self.statement[1:]:
320
332
  token.type = Token.ARGUMENT
321
- self._lex_options('limit=', 'on_limit=', 'on_limit_message=')
333
+ self._lex_options('limit', 'on_limit', 'on_limit_message')
322
334
 
323
335
 
324
336
  class EndLexer(TypeAndArguments):
@@ -328,6 +340,23 @@ class EndLexer(TypeAndArguments):
328
340
  return statement[0].value == 'END'
329
341
 
330
342
 
343
+ class VarLexer(StatementLexer):
344
+ token_type = Token.VAR
345
+
346
+ def handles(self, statement: StatementTokens) -> bool:
347
+ return statement[0].value == 'VAR'
348
+
349
+ def lex(self):
350
+ self.statement[0].type = Token.VAR
351
+ if len(self.statement) > 1:
352
+ name, *values = self.statement[1:]
353
+ name.type = Token.VARIABLE
354
+ for value in values:
355
+ value.type = Token.ARGUMENT
356
+ options = ['scope', 'separator'] if name.value[:1] == '$' else ['scope']
357
+ self._lex_options(*options)
358
+
359
+
331
360
  class ReturnLexer(TypeAndArguments):
332
361
  token_type = Token.RETURN_STATEMENT
333
362
 
@@ -16,7 +16,7 @@
16
16
  from collections.abc import Iterator
17
17
  from typing import cast, List
18
18
 
19
- from robot.variables import VariableIterator
19
+ from robot.variables import VariableMatches
20
20
 
21
21
 
22
22
  # Type alias to ease typing elsewhere
@@ -49,7 +49,7 @@ class Token:
49
49
  KEYWORD_HEADER = 'KEYWORD HEADER'
50
50
  COMMENT_HEADER = 'COMMENT HEADER'
51
51
  INVALID_HEADER = 'INVALID HEADER'
52
- FATAL_INVALID_HEADER = 'FATAL INVALID HEADER'
52
+ FATAL_INVALID_HEADER = 'FATAL INVALID HEADER' # TODO: Remove in RF 8.
53
53
 
54
54
  TESTCASE_NAME = 'TESTCASE NAME'
55
55
  KEYWORD_NAME = 'KEYWORD NAME'
@@ -62,7 +62,8 @@ class Token:
62
62
  TEST_TEARDOWN = 'TEST TEARDOWN'
63
63
  TEST_TEMPLATE = 'TEST TEMPLATE'
64
64
  TEST_TIMEOUT = 'TEST TIMEOUT'
65
- FORCE_TAGS = 'FORCE TAGS'
65
+ TEST_TAGS = 'TEST TAGS'
66
+ FORCE_TAGS = TEST_TAGS # TODO: Remove in RF 8.
66
67
  DEFAULT_TAGS = 'DEFAULT TAGS'
67
68
  KEYWORD_TAGS = 'KEYWORD TAGS'
68
69
  LIBRARY = 'LIBRARY'
@@ -74,14 +75,11 @@ class Token:
74
75
  TIMEOUT = 'TIMEOUT'
75
76
  TAGS = 'TAGS'
76
77
  ARGUMENTS = 'ARGUMENTS'
77
- # Use ´RETURN_SETTING` type instead of `RETURN`. `[Return]` is deprecated and
78
- # `RETURN` type will be used with `RETURN` statement in the future.
79
- RETURN = 'RETURN'
80
- RETURN_SETTING = RETURN
78
+ RETURN = 'RETURN' # TODO: Change to mean RETURN statement in RF 8.
79
+ RETURN_SETTING = RETURN # TODO: Remove in RF 8.
81
80
 
82
- # TODO: Change WITH_NAME value to AS in RF 7.0. Remove WITH_NAME in RF 8.
83
- WITH_NAME = 'WITH NAME'
84
81
  AS = 'AS'
82
+ WITH_NAME = AS # TODO: Remove in RF 8.
85
83
 
86
84
  NAME = 'NAME'
87
85
  VARIABLE = 'VARIABLE'
@@ -99,6 +97,7 @@ class Token:
99
97
  EXCEPT = 'EXCEPT'
100
98
  FINALLY = 'FINALLY'
101
99
  WHILE = 'WHILE'
100
+ VAR = 'VAR'
102
101
  RETURN_STATEMENT = 'RETURN STATEMENT'
103
102
  CONTINUE = 'CONTINUE'
104
103
  BREAK = 'BREAK'
@@ -110,10 +109,8 @@ class Token:
110
109
  CONFIG = 'CONFIG'
111
110
  EOL = 'EOL'
112
111
  EOS = 'EOS'
113
-
114
112
  ERROR = 'ERROR'
115
- # TODO: FATAL_ERROR is no longer used, remove in RF 7.0
116
- FATAL_ERROR = 'FATAL ERROR'
113
+ FATAL_ERROR = 'FATAL ERROR' # TODO: Remove in RF 8.
117
114
 
118
115
  NON_DATA_TOKENS = frozenset((
119
116
  SEPARATOR,
@@ -132,7 +129,7 @@ class Token:
132
129
  TEST_TEARDOWN,
133
130
  TEST_TEMPLATE,
134
131
  TEST_TIMEOUT,
135
- FORCE_TAGS,
132
+ TEST_TAGS,
136
133
  DEFAULT_TAGS,
137
134
  KEYWORD_TAGS,
138
135
  LIBRARY,
@@ -172,9 +169,10 @@ class Token:
172
169
  Token.IF: 'IF', Token.INLINE_IF: 'IF', Token.ELSE_IF: 'ELSE IF',
173
170
  Token.ELSE: 'ELSE', Token.FOR: 'FOR', Token.WHILE: 'WHILE',
174
171
  Token.TRY: 'TRY', Token.EXCEPT: 'EXCEPT', Token.FINALLY: 'FINALLY',
175
- Token.END: 'END', Token.CONTINUE: 'CONTINUE', Token.BREAK: 'BREAK',
176
- Token.RETURN_STATEMENT: 'RETURN', Token.CONTINUATION: '...',
177
- Token.EOL: '\n', Token.WITH_NAME: 'WITH NAME', Token.AS: 'AS'
172
+ Token.END: 'END', Token.VAR: 'VAR', Token.CONTINUE: 'CONTINUE',
173
+ Token.BREAK: 'BREAK', Token.RETURN_STATEMENT: 'RETURN',
174
+ Token.CONTINUATION: '...', Token.EOL: '\n', Token.WITH_NAME: 'AS',
175
+ Token.AS: 'AS'
178
176
  }.get(type, '') # type: ignore
179
177
  self.value = cast(str, value)
180
178
  self.lineno = lineno
@@ -205,26 +203,26 @@ class Token:
205
203
  """
206
204
  if self.type not in Token.ALLOW_VARIABLES:
207
205
  return self._tokenize_no_variables()
208
- variables = VariableIterator(self.value)
209
- if not variables:
206
+ matches = VariableMatches(self.value)
207
+ if not matches:
210
208
  return self._tokenize_no_variables()
211
- return self._tokenize_variables(variables)
209
+ return self._tokenize_variables(matches)
212
210
 
213
211
  def _tokenize_no_variables(self) -> 'Iterator[Token]':
214
212
  yield self
215
213
 
216
- def _tokenize_variables(self, variables) -> 'Iterator[Token]':
214
+ def _tokenize_variables(self, matches) -> 'Iterator[Token]':
217
215
  lineno = self.lineno
218
216
  col_offset = self.col_offset
219
- remaining = ''
220
- for before, variable, remaining in variables:
221
- if before:
222
- yield Token(self.type, before, lineno, col_offset)
223
- col_offset += len(before)
224
- yield Token(Token.VARIABLE, variable, lineno, col_offset)
225
- col_offset += len(variable)
226
- if remaining:
227
- yield Token(self.type, remaining, lineno, col_offset)
217
+ after = ''
218
+ for match in matches:
219
+ if match.before:
220
+ yield Token(self.type, match.before, lineno, col_offset)
221
+ yield Token(Token.VARIABLE, match.match, lineno, col_offset + match.start)
222
+ col_offset += match.end
223
+ after = match.after
224
+ if after:
225
+ yield Token(self.type, after, lineno, col_offset)
228
226
 
229
227
  def __str__(self) -> str:
230
228
  return self.value
@@ -13,6 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
+ import warnings
16
17
  from abc import ABC
17
18
  from contextlib import contextmanager
18
19
  from pathlib import Path
@@ -24,7 +25,7 @@ from .statements import (Break, Continue, ElseHeader, ElseIfHeader, End, ExceptH
24
25
  Error, FinallyHeader, ForHeader, IfHeader, KeywordCall,
25
26
  KeywordName, Node, ReturnSetting, ReturnStatement,
26
27
  SectionHeader, Statement, TemplateArguments, TestCaseName,
27
- TryHeader, WhileHeader)
28
+ TryHeader, Var, WhileHeader)
28
29
  from .visitor import ModelVisitor
29
30
  from ..lexer import Token
30
31
 
@@ -97,7 +98,7 @@ class Block(Container, ABC):
97
98
 
98
99
  def _body_is_empty(self):
99
100
  # This works with tests, keywords, and blocks inside them, not with sections.
100
- valid = (KeywordCall, TemplateArguments, Continue, Break, ReturnSetting,
101
+ valid = (KeywordCall, TemplateArguments, Var, Continue, Break, ReturnSetting,
101
102
  ReturnStatement, NestedBlock, Error)
102
103
  return not any(isinstance(node, valid) for node in self.body)
103
104
 
@@ -255,8 +256,14 @@ class For(NestedBlock):
255
256
  header: ForHeader
256
257
 
257
258
  @property
258
- def variables(self) -> 'tuple[str, ...]':
259
- return self.header.variables
259
+ def assign(self) -> 'tuple[str, ...]':
260
+ return self.header.assign
261
+
262
+ @property
263
+ def variables(self) -> 'tuple[str, ...]': # TODO: Remove in RF 8.0.
264
+ warnings.warn("'For.variables' is deprecated and will be removed in "
265
+ "Robot Framework 8.0. Use 'For.assign' instead.")
266
+ return self.assign
260
267
 
261
268
  @property
262
269
  def values(self) -> 'tuple[str, ...]':
@@ -307,8 +314,14 @@ class Try(NestedBlock):
307
314
  return getattr(self.header, 'pattern_type', None)
308
315
 
309
316
  @property
310
- def variable(self) -> 'str|None':
311
- return getattr(self.header, 'variable', None)
317
+ def assign(self) -> 'str|None':
318
+ return getattr(self.header, 'assign', None)
319
+
320
+ @property
321
+ def variable(self) -> 'str|None': # TODO: Remove in RF 8.0.
322
+ warnings.warn("'Try.variable' is deprecated and will be removed in "
323
+ "Robot Framework 8.0. Use 'Try.assign' instead.")
324
+ return self.assign
312
325
 
313
326
  def validate(self, ctx: 'ValidationContext'):
314
327
  self._validate_body()