robotframework 6.1rc1__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.
- {robotframework-6.1rc1 → robotframework-7.0}/INSTALL.rst +25 -25
- {robotframework-6.1rc1 → robotframework-7.0}/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/README.rst +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/setup.py +3 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/__init__.py +4 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/deco.py +60 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/exceptions.py +6 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/interfaces.py +403 -68
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/logger.py +27 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/parsing.py +4 -2
- robotframework-7.0/src/robot/api/py.typed +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/settings.py +21 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/storage.js +11 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/htmlfilewriter.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.css +10 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.html +10 -0
- robotframework-7.0/src/robot/htmldata/rebot/common.css +362 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/doc_formatting.css +13 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.css +51 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.html +14 -23
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.css +83 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.html +22 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/view.js +84 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonbuilder.py +38 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/model.py +21 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/robotbuilder.py +50 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/standardtypes.py +9 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlbuilder.py +35 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlwriter.py +18 -38
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/BuiltIn.py +255 -205
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Collections.py +384 -240
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/DateTime.py +73 -60
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/OperatingSystem.py +6 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/String.py +66 -76
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/XML.py +66 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/__init__.py +5 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/body.py +44 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/control.py +230 -88
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/filter.py +31 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/itemlist.py +9 -8
- robotframework-7.0/src/robot/model/keyword.py +77 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modelobject.py +27 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testcase.py +15 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testsuite.py +44 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/visitor.py +35 -8
- robotframework-7.0/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/verbose.py +61 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/debugfile.py +39 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/filelogger.py +18 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/librarylogger.py +3 -2
- robotframework-7.0/src/robot/output/listeners.py +753 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/logger.py +216 -80
- robotframework-7.0/src/robot/output/loggerapi.py +215 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0/src/robot/output/output.py +185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/stdoutlogsplitter.py +8 -5
- robotframework-7.0/src/robot/output/xmllogger.py +459 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/statements.py +193 -94
- robotframework-7.0/src/robot/parsing/model/visitor.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/rebot.py +2 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/logreportwriters.py +16 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/outputwriter.py +18 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/resultwriter.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/stringcache.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionresult.py +56 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/flattenkeywordmatcher.py +48 -9
- robotframework-7.0/src/robot/result/keywordremover.py +207 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/merger.py +1 -1
- robotframework-7.0/src/robot/result/model.py +1185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/resultbuilder.py +46 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/xmlelementhandlers.py +83 -43
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/run.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/__init__.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/__init__.py +2 -1
- robotframework-7.0/src/robot/running/arguments/argumentconverter.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentmapper.py +26 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentparser.py +85 -61
- robotframework-7.0/src/robot/running/arguments/argumentresolver.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentspec.py +83 -116
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentvalidator.py +33 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/customconverters.py +15 -12
- robotframework-7.0/src/robot/running/arguments/embedded.py +145 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/typeconverters.py +268 -220
- robotframework-7.0/src/robot/running/arguments/typeinfo.py +317 -0
- robotframework-7.0/src/robot/running/arguments/typeinfoparser.py +219 -0
- robotframework-7.0/src/robot/running/arguments/typevalidator.py +60 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/bodyrunner.py +147 -129
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/builders.py +17 -26
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/parsers.py +17 -11
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/settings.py +9 -17
- robotframework-7.0/src/robot/running/builder/transformers.py +535 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/context.py +113 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/dynamicmethods.py +62 -34
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/importer.py +27 -49
- robotframework-7.0/src/robot/running/invalidkeyword.py +67 -0
- robotframework-7.0/src/robot/running/keywordfinder.py +91 -0
- robotframework-7.0/src/robot/running/keywordimplementation.py +164 -0
- robotframework-7.0/src/robot/running/librarykeyword.py +392 -0
- robotframework-7.0/src/robot/running/librarykeywordrunner.py +250 -0
- robotframework-7.0/src/robot/running/libraryscopes.py +115 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/model.py +198 -337
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/namespace.py +124 -137
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/outputcapture.py +20 -12
- robotframework-7.0/src/robot/running/resourcemodel.py +448 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/statusreporter.py +16 -13
- robotframework-7.0/src/robot/running/suiterunner.py +265 -0
- robotframework-7.0/src/robot/running/testlibraries.py +500 -0
- robotframework-7.0/src/robot/running/userkeywordrunner.py +260 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/__init__.py +53 -35
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/dotdict.py +3 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/escaping.py +19 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/importer.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markupwriters.py +23 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/misc.py +1 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotio.py +9 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottime.py +122 -90
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottypes.py +21 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/scopes.py +17 -12
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/store.py +14 -16
- robotframework-7.0/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/SOURCES.txt +10 -8
- {robotframework-6.1rc1 → robotframework-7.0}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/htmldata/rebot/common.css +0 -239
- robotframework-6.1rc1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1rc1/src/robot/model/keyword.py +0 -173
- robotframework-6.1rc1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1rc1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1rc1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1rc1/src/robot/output/listeners.py +0 -174
- robotframework-6.1rc1/src/robot/output/output.py +0 -95
- robotframework-6.1rc1/src/robot/output/xmllogger.py +0 -354
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/result/keywordremover.py +0 -183
- robotframework-6.1rc1/src/robot/result/model.py +0 -957
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/argumentresolver.py +0 -131
- robotframework-6.1rc1/src/robot/running/arguments/embedded.py +0 -146
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/builder/transformers.py +0 -642
- robotframework-6.1rc1/src/robot/running/handlers.py +0 -321
- robotframework-6.1rc1/src/robot/running/handlerstore.py +0 -66
- robotframework-6.1rc1/src/robot/running/librarykeywordrunner.py +0 -238
- robotframework-6.1rc1/src/robot/running/libraryscopes.py +0 -97
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/running/suiterunner.py +0 -249
- robotframework-6.1rc1/src/robot/running/testlibraries.py +0 -420
- robotframework-6.1rc1/src/robot/running/usererrorhandler.py +0 -75
- robotframework-6.1rc1/src/robot/running/userkeyword.py +0 -111
- robotframework-6.1rc1/src/robot/running/userkeywordrunner.py +0 -274
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -97,9 +97,9 @@ class LibraryDoc:
|
|
|
97
97
|
formatter = DocFormatter(self.keywords, self.type_docs, self.doc, self.doc_format)
|
|
98
98
|
self._doc = formatter.html(self.doc, intro=True)
|
|
99
99
|
for item in self.inits + self.keywords:
|
|
100
|
-
# If '
|
|
100
|
+
# If 'short_doc' is not set, it is generated automatically based on 'doc'
|
|
101
101
|
# when accessed. Generate and set it to avoid HTML format affecting it.
|
|
102
|
-
item.
|
|
102
|
+
item.short_doc = item.short_doc
|
|
103
103
|
item.doc = formatter.html(item.doc)
|
|
104
104
|
for type_doc in self.type_docs:
|
|
105
105
|
# Standard docs are always in ROBOT format ...
|
|
@@ -113,7 +113,7 @@ class LibraryDoc:
|
|
|
113
113
|
|
|
114
114
|
def to_dictionary(self, include_private=False, theme=None):
|
|
115
115
|
data = {
|
|
116
|
-
'specversion':
|
|
116
|
+
'specversion': 3,
|
|
117
117
|
'name': self.name,
|
|
118
118
|
'doc': self.doc,
|
|
119
119
|
'version': self.version,
|
|
@@ -127,22 +127,12 @@ class LibraryDoc:
|
|
|
127
127
|
'inits': [init.to_dictionary() for init in self.inits],
|
|
128
128
|
'keywords': [kw.to_dictionary() for kw in self.keywords
|
|
129
129
|
if include_private or not kw.private],
|
|
130
|
-
# 'dataTypes' was deprecated in RF 5, 'typedoc' should be used instead.
|
|
131
|
-
'dataTypes': self._get_data_types(self.type_docs),
|
|
132
130
|
'typedocs': [t.to_dictionary() for t in sorted(self.type_docs)]
|
|
133
131
|
}
|
|
134
132
|
if theme:
|
|
135
133
|
data['theme'] = theme.lower()
|
|
136
134
|
return data
|
|
137
135
|
|
|
138
|
-
def _get_data_types(self, types):
|
|
139
|
-
enums = sorted(t for t in types if t.type == 'Enum')
|
|
140
|
-
typed_dicts = sorted(t for t in types if t.type == 'TypedDict')
|
|
141
|
-
return {
|
|
142
|
-
'enums': [t.to_dictionary(legacy=True) for t in enums],
|
|
143
|
-
'typedDicts': [t.to_dictionary(legacy=True) for t in typed_dicts]
|
|
144
|
-
}
|
|
145
|
-
|
|
146
136
|
def to_json(self, indent=None, include_private=True, theme=None):
|
|
147
137
|
data = self.to_dictionary(include_private, theme)
|
|
148
138
|
return json.dumps(data, indent=indent)
|
|
@@ -151,12 +141,12 @@ class LibraryDoc:
|
|
|
151
141
|
class KeywordDoc(Sortable):
|
|
152
142
|
"""Documentation for a single keyword or an initializer."""
|
|
153
143
|
|
|
154
|
-
def __init__(self, name='', args=None, doc='',
|
|
144
|
+
def __init__(self, name='', args=None, doc='', short_doc='', tags=(), private=False,
|
|
155
145
|
deprecated=False, source=None, lineno=-1, parent=None):
|
|
156
146
|
self.name = name
|
|
157
|
-
self.args = args
|
|
147
|
+
self.args = args if args is not None else ArgumentSpec()
|
|
158
148
|
self.doc = doc
|
|
159
|
-
self.
|
|
149
|
+
self._short_doc = short_doc
|
|
160
150
|
self.tags = Tags(tags)
|
|
161
151
|
self.private = private
|
|
162
152
|
self.deprecated = deprecated
|
|
@@ -167,19 +157,19 @@ class KeywordDoc(Sortable):
|
|
|
167
157
|
self.type_docs = {arg.name: {} for arg in self.args}
|
|
168
158
|
|
|
169
159
|
@property
|
|
170
|
-
def
|
|
171
|
-
return self.
|
|
160
|
+
def short_doc(self):
|
|
161
|
+
return self._short_doc or self._doc_to_short_doc()
|
|
172
162
|
|
|
173
|
-
def
|
|
163
|
+
def _doc_to_short_doc(self):
|
|
174
164
|
if self.parent and self.parent.doc_format == 'HTML':
|
|
175
|
-
doc = HtmlToText().
|
|
165
|
+
doc = HtmlToText().get_short_doc_from_html(self.doc)
|
|
176
166
|
else:
|
|
177
167
|
doc = self.doc
|
|
178
168
|
return ' '.join(getshortdoc(doc).splitlines())
|
|
179
169
|
|
|
180
|
-
@
|
|
181
|
-
def
|
|
182
|
-
self.
|
|
170
|
+
@short_doc.setter
|
|
171
|
+
def short_doc(self, short_doc):
|
|
172
|
+
self._short_doc = short_doc
|
|
183
173
|
|
|
184
174
|
@property
|
|
185
175
|
def _sort_key(self):
|
|
@@ -189,8 +179,9 @@ class KeywordDoc(Sortable):
|
|
|
189
179
|
data = {
|
|
190
180
|
'name': self.name,
|
|
191
181
|
'args': [self._arg_to_dict(arg) for arg in self.args],
|
|
182
|
+
'returnType': self._return_to_dict(self.args.return_type),
|
|
192
183
|
'doc': self.doc,
|
|
193
|
-
'shortdoc': self.
|
|
184
|
+
'shortdoc': self.short_doc,
|
|
194
185
|
'tags': list(self.tags),
|
|
195
186
|
'source': str(self.source) if self.source else None,
|
|
196
187
|
'lineno': self.lineno
|
|
@@ -206,18 +197,20 @@ class KeywordDoc(Sortable):
|
|
|
206
197
|
return {
|
|
207
198
|
'name': arg.name,
|
|
208
199
|
'type': self._type_to_dict(arg.type, type_docs),
|
|
209
|
-
'types': arg.types_reprs,
|
|
210
|
-
'typedocs': type_docs,
|
|
211
200
|
'defaultValue': arg.default_repr,
|
|
212
201
|
'kind': arg.kind,
|
|
213
202
|
'required': arg.required,
|
|
214
203
|
'repr': str(arg)
|
|
215
204
|
}
|
|
216
205
|
|
|
217
|
-
def
|
|
206
|
+
def _return_to_dict(self, return_type):
|
|
207
|
+
type_docs = self.type_docs.get('return', {})
|
|
208
|
+
return self._type_to_dict(return_type, type_docs)
|
|
209
|
+
|
|
210
|
+
def _type_to_dict(self, type: 'TypeInfo|None', type_docs: dict):
|
|
218
211
|
if not type:
|
|
219
212
|
return None
|
|
220
213
|
return {'name': type.name,
|
|
221
214
|
'typedoc': type_docs.get(type.name),
|
|
222
|
-
'nested': [self._type_to_dict(t, type_docs) for t in type.nested],
|
|
215
|
+
'nested': [self._type_to_dict(t, type_docs) for t in type.nested or ()],
|
|
223
216
|
'union': type.is_union}
|
|
@@ -18,8 +18,8 @@ import sys
|
|
|
18
18
|
import re
|
|
19
19
|
|
|
20
20
|
from robot.errors import DataError
|
|
21
|
-
from robot.running import (
|
|
22
|
-
|
|
21
|
+
from robot.running import (ArgumentSpec, ResourceFileBuilder, TestLibrary,
|
|
22
|
+
TestSuiteBuilder, TypeInfo)
|
|
23
23
|
from robot.utils import is_string, split_tags_from_doc, unescape
|
|
24
24
|
from robot.variables import search_variable
|
|
25
25
|
|
|
@@ -32,11 +32,11 @@ class LibraryDocBuilder:
|
|
|
32
32
|
|
|
33
33
|
def build(self, library):
|
|
34
34
|
name, args = self._split_library_name_and_args(library)
|
|
35
|
-
lib = TestLibrary(name, args)
|
|
35
|
+
lib = TestLibrary.from_name(name, args=args)
|
|
36
36
|
libdoc = LibraryDoc(name=lib.name,
|
|
37
37
|
doc=self._get_doc(lib),
|
|
38
38
|
version=lib.version,
|
|
39
|
-
scope=
|
|
39
|
+
scope=lib.scope.name,
|
|
40
40
|
doc_format=lib.doc_format,
|
|
41
41
|
source=lib.source,
|
|
42
42
|
lineno=lib.lineno)
|
|
@@ -61,29 +61,36 @@ class LibraryDocBuilder:
|
|
|
61
61
|
return lib.doc or f"Documentation for library ``{lib.name}``."
|
|
62
62
|
|
|
63
63
|
def _get_initializers(self, lib):
|
|
64
|
-
if lib.init.
|
|
64
|
+
if lib.init.args:
|
|
65
65
|
return [KeywordDocBuilder().build_keyword(lib.init)]
|
|
66
66
|
return []
|
|
67
67
|
|
|
68
68
|
def _get_type_docs(self, keywords, custom_converters):
|
|
69
|
-
|
|
69
|
+
all_type_docs = {}
|
|
70
70
|
for kw in keywords:
|
|
71
|
-
for
|
|
72
|
-
kw.type_docs
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
for type_doc, usages in type_docs.items():
|
|
71
|
+
for name, type_info in self._yield_names_and_infos(kw.args):
|
|
72
|
+
type_docs = kw.type_docs.setdefault(name, {})
|
|
73
|
+
type_doc = TypeDoc.for_type(type_info, custom_converters)
|
|
74
|
+
if type_doc:
|
|
75
|
+
type_docs[type_info.name] = type_doc.name
|
|
76
|
+
all_type_docs.setdefault(type_doc, set()).add(kw.name)
|
|
77
|
+
for type_doc, usages in all_type_docs.items():
|
|
79
78
|
type_doc.usages = sorted(usages, key=str.lower)
|
|
80
|
-
return set(
|
|
79
|
+
return set(all_type_docs)
|
|
81
80
|
|
|
82
|
-
def
|
|
81
|
+
def _yield_names_and_infos(self, args: ArgumentSpec):
|
|
82
|
+
for arg in args:
|
|
83
|
+
for type_info in self._yield_infos(arg.type):
|
|
84
|
+
yield arg.name, type_info
|
|
85
|
+
if args.return_type:
|
|
86
|
+
for type_info in self._yield_infos(args.return_type):
|
|
87
|
+
yield 'return', type_info
|
|
88
|
+
|
|
89
|
+
def _yield_infos(self, info: TypeInfo):
|
|
83
90
|
if not info.is_union:
|
|
84
91
|
yield info
|
|
85
|
-
for nested in info.nested:
|
|
86
|
-
yield from self.
|
|
92
|
+
for nested in info.nested or ():
|
|
93
|
+
yield from self._yield_infos(nested)
|
|
87
94
|
|
|
88
95
|
|
|
89
96
|
class ResourceDocBuilder:
|
|
@@ -91,19 +98,18 @@ class ResourceDocBuilder:
|
|
|
91
98
|
|
|
92
99
|
def build(self, path):
|
|
93
100
|
path = self._find_resource_file(path)
|
|
94
|
-
|
|
101
|
+
resource, name = self._import_resource(path)
|
|
95
102
|
libdoc = LibraryDoc(name=name,
|
|
96
|
-
doc=self._get_doc(
|
|
103
|
+
doc=self._get_doc(resource, name),
|
|
97
104
|
type=self.type,
|
|
98
105
|
scope='GLOBAL',
|
|
99
|
-
source=
|
|
106
|
+
source=resource.source,
|
|
100
107
|
lineno=1)
|
|
101
|
-
libdoc.keywords = KeywordDocBuilder(resource=True).build_keywords(
|
|
108
|
+
libdoc.keywords = KeywordDocBuilder(resource=True).build_keywords(resource)
|
|
102
109
|
return libdoc
|
|
103
110
|
|
|
104
111
|
def _import_resource(self, path):
|
|
105
|
-
|
|
106
|
-
resource = UserLibrary(model)
|
|
112
|
+
resource = ResourceFileBuilder(process_curdir=False).build(path)
|
|
107
113
|
return resource, resource.name
|
|
108
114
|
|
|
109
115
|
def _find_resource_file(self, path):
|
|
@@ -128,10 +134,11 @@ class SuiteDocBuilder(ResourceDocBuilder):
|
|
|
128
134
|
builder = TestSuiteBuilder(process_curdir=False)
|
|
129
135
|
if os.path.basename(path).lower() == '__init__.robot':
|
|
130
136
|
path = os.path.dirname(path)
|
|
131
|
-
builder.included_suites = ()
|
|
132
137
|
builder.allow_empty_suite = True
|
|
138
|
+
# Hack to disable parsing nested files.
|
|
139
|
+
builder.included_files = ('-no-files-included-',)
|
|
133
140
|
suite = builder.build(path)
|
|
134
|
-
return
|
|
141
|
+
return suite.resource, suite.name
|
|
135
142
|
|
|
136
143
|
def _get_doc(self, resource, name):
|
|
137
144
|
return f"Documentation for keywords in suite ``{name}``."
|
|
@@ -142,15 +149,19 @@ class KeywordDocBuilder:
|
|
|
142
149
|
def __init__(self, resource=False):
|
|
143
150
|
self._resource = resource
|
|
144
151
|
|
|
145
|
-
def build_keywords(self,
|
|
146
|
-
return [self.build_keyword(kw) for kw in
|
|
152
|
+
def build_keywords(self, owner):
|
|
153
|
+
return [self.build_keyword(kw) for kw in owner.keywords]
|
|
147
154
|
|
|
148
155
|
def build_keyword(self, kw):
|
|
149
156
|
doc, tags = self._get_doc_and_tags(kw)
|
|
157
|
+
if kw.error:
|
|
158
|
+
doc = f'*Creating keyword failed:* {kw.error}'
|
|
150
159
|
if not self._resource:
|
|
151
|
-
self._escape_strings_in_defaults(kw.
|
|
160
|
+
self._escape_strings_in_defaults(kw.args.defaults)
|
|
161
|
+
if kw.args.embedded:
|
|
162
|
+
self._remove_embedded(kw.args)
|
|
152
163
|
return KeywordDoc(name=kw.name,
|
|
153
|
-
args=kw.
|
|
164
|
+
args=kw.args,
|
|
154
165
|
doc=doc,
|
|
155
166
|
tags=tags,
|
|
156
167
|
private=tags.robot('private'),
|
|
@@ -182,6 +193,14 @@ class KeywordDocBuilder:
|
|
|
182
193
|
return doc, kw.tags + tags
|
|
183
194
|
|
|
184
195
|
def _get_doc(self, kw):
|
|
185
|
-
if self._resource
|
|
196
|
+
if self._resource:
|
|
186
197
|
return unescape(kw.doc)
|
|
187
198
|
return kw.doc
|
|
199
|
+
|
|
200
|
+
def _remove_embedded(self, spec: ArgumentSpec):
|
|
201
|
+
embedded = len(spec.embedded)
|
|
202
|
+
pos_only = len(spec.positional_only)
|
|
203
|
+
spec.positional_only = spec.positional_only[embedded:]
|
|
204
|
+
if embedded > pos_only:
|
|
205
|
+
spec.positional_or_named = spec.positional_or_named[embedded-pos_only:]
|
|
206
|
+
spec.embedded = ()
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
from datetime import date, datetime, timedelta
|
|
17
17
|
from decimal import Decimal
|
|
18
18
|
from pathlib import Path
|
|
19
|
-
from typing import Any
|
|
19
|
+
from typing import Any, Literal
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
STANDARD_TYPE_DOCS = {
|
|
@@ -180,6 +180,14 @@ If the type has nested types like ``frozenset[int]``, items are converted
|
|
|
180
180
|
to those types automatically. This in new in Robot Framework 6.0.
|
|
181
181
|
|
|
182
182
|
Examples: ``{1, 2, 3, 42}``, ``set()`` (an empty set)
|
|
183
|
+
''',
|
|
184
|
+
Literal: '''\
|
|
185
|
+
Only specified values are accepted. Values can be strings,
|
|
186
|
+
integers, bytes, Booleans, enums and None, and used arguments
|
|
187
|
+
are converted using the value type specific conversion logic.
|
|
188
|
+
|
|
189
|
+
Strings are case, space, underscore and hyphen insensitive,
|
|
190
|
+
but exact matches have precedence over normalized matches.
|
|
183
191
|
'''
|
|
184
192
|
}
|
|
185
193
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import os.path
|
|
17
17
|
|
|
18
18
|
from robot.errors import DataError
|
|
19
|
-
from robot.running import ArgInfo
|
|
19
|
+
from robot.running import ArgInfo, TypeInfo
|
|
20
20
|
from robot.utils import ET, ETSource
|
|
21
21
|
|
|
22
22
|
from .datatypes import EnumMember, TypedDictItem, TypeDoc
|
|
@@ -52,9 +52,9 @@ class XmlDocBuilder:
|
|
|
52
52
|
if root.tag != 'keywordspec':
|
|
53
53
|
raise DataError(f"Invalid spec file '{path}'.")
|
|
54
54
|
version = root.get('specversion')
|
|
55
|
-
if version not in ('3', '4', '5'):
|
|
55
|
+
if version not in ('3', '4', '5', '6'):
|
|
56
56
|
raise DataError(f"Invalid spec file version '{version}'. "
|
|
57
|
-
f"Supported versions are 3, 4 and
|
|
57
|
+
f"Supported versions are 3, 4, 5, and 6.")
|
|
58
58
|
return root
|
|
59
59
|
|
|
60
60
|
def _create_keywords(self, spec, path, lib_source):
|
|
@@ -63,32 +63,38 @@ class XmlDocBuilder:
|
|
|
63
63
|
def _create_keyword(self, elem, lib_source):
|
|
64
64
|
kw = KeywordDoc(name=elem.get('name', ''),
|
|
65
65
|
doc=elem.find('doc').text or '',
|
|
66
|
-
|
|
66
|
+
short_doc=elem.find('shortdoc').text or '',
|
|
67
67
|
tags=[t.text for t in elem.findall('tags/tag')],
|
|
68
68
|
private=elem.get('private', 'false') == 'true',
|
|
69
69
|
deprecated=elem.get('deprecated', 'false') == 'true',
|
|
70
70
|
source=elem.get('source') or lib_source,
|
|
71
71
|
lineno=int(elem.get('lineno', -1)))
|
|
72
72
|
self._create_arguments(elem, kw)
|
|
73
|
+
self._add_return_type(elem.find('returntype'), kw)
|
|
73
74
|
return kw
|
|
74
75
|
|
|
75
76
|
def _create_arguments(self, elem, kw: KeywordDoc):
|
|
76
77
|
spec = kw.args
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ArgInfo.VAR_POSITIONAL: lambda value: setattr(spec, 'var_positional', value),
|
|
82
|
-
ArgInfo.NAMED_ONLY_MARKER: lambda value: None,
|
|
83
|
-
ArgInfo.NAMED_ONLY: spec.named_only.append,
|
|
84
|
-
ArgInfo.VAR_NAMED: lambda value: setattr(spec, 'var_named', value),
|
|
85
|
-
}
|
|
78
|
+
spec = kw.args
|
|
79
|
+
positional_only = []
|
|
80
|
+
positional_or_named = []
|
|
81
|
+
named_only = []
|
|
86
82
|
for arg in elem.findall('arguments/arg'):
|
|
87
83
|
name_elem = arg.find('name')
|
|
88
84
|
if name_elem is None:
|
|
89
85
|
continue
|
|
90
86
|
name = name_elem.text
|
|
91
|
-
|
|
87
|
+
kind = arg.get('kind')
|
|
88
|
+
if kind == ArgInfo.POSITIONAL_ONLY:
|
|
89
|
+
positional_only.append(name)
|
|
90
|
+
elif kind == ArgInfo.POSITIONAL_OR_NAMED:
|
|
91
|
+
positional_or_named.append(name)
|
|
92
|
+
elif kind == ArgInfo.VAR_POSITIONAL:
|
|
93
|
+
spec.var_positional = name
|
|
94
|
+
elif kind == ArgInfo.NAMED_ONLY:
|
|
95
|
+
named_only.append(name)
|
|
96
|
+
elif kind == ArgInfo.VAR_NAMED:
|
|
97
|
+
spec.var_named = name
|
|
92
98
|
default_elem = arg.find('default')
|
|
93
99
|
if default_elem is not None:
|
|
94
100
|
spec.defaults[name] = default_elem.text or ''
|
|
@@ -97,20 +103,23 @@ class XmlDocBuilder:
|
|
|
97
103
|
type_docs = {}
|
|
98
104
|
type_elems = arg.findall('type')
|
|
99
105
|
if len(type_elems) == 1 and 'name' in type_elems[0].attrib:
|
|
100
|
-
type_info = self.
|
|
106
|
+
type_info = self._parse_type_info(type_elems[0], type_docs)
|
|
101
107
|
else:
|
|
102
108
|
type_info = self._parse_legacy_type_info(type_elems, type_docs)
|
|
103
109
|
if type_info:
|
|
104
110
|
spec.types[name] = type_info
|
|
105
111
|
kw.type_docs[name] = type_docs
|
|
112
|
+
spec.positional_only = positional_only
|
|
113
|
+
spec.positional_or_named = positional_or_named
|
|
114
|
+
spec.named_only = named_only
|
|
106
115
|
|
|
107
|
-
def
|
|
116
|
+
def _parse_type_info(self, type_elem, type_docs):
|
|
108
117
|
name = type_elem.get('name')
|
|
109
118
|
if type_elem.get('typedoc'):
|
|
110
119
|
type_docs[name] = type_elem.get('typedoc')
|
|
111
|
-
nested =
|
|
112
|
-
|
|
113
|
-
return
|
|
120
|
+
nested = [self._parse_type_info(child, type_docs)
|
|
121
|
+
for child in type_elem.findall('type')]
|
|
122
|
+
return TypeInfo(name, None, nested=nested or None)
|
|
114
123
|
|
|
115
124
|
def _parse_legacy_type_info(self, type_elems, type_docs):
|
|
116
125
|
types = []
|
|
@@ -119,7 +128,13 @@ class XmlDocBuilder:
|
|
|
119
128
|
types.append(name)
|
|
120
129
|
if elem.get('typedoc'):
|
|
121
130
|
type_docs[name] = elem.get('typedoc')
|
|
122
|
-
return types
|
|
131
|
+
return TypeInfo.from_sequence(types) if types else None
|
|
132
|
+
|
|
133
|
+
def _add_return_type(self, elem, kw):
|
|
134
|
+
if elem is not None:
|
|
135
|
+
type_docs = {}
|
|
136
|
+
kw.args.return_type = self._parse_type_info(elem, type_docs)
|
|
137
|
+
kw.type_docs['return'] = type_docs
|
|
123
138
|
|
|
124
139
|
def _parse_type_docs(self, spec):
|
|
125
140
|
for elem in spec.findall('typedocs/type'):
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
from robot.running import TypeInfo
|
|
17
|
-
from robot.utils import XmlWriter
|
|
17
|
+
from robot.utils import NOT_SET, XmlWriter
|
|
18
18
|
|
|
19
19
|
from .output import get_generation_time
|
|
20
20
|
|
|
@@ -26,9 +26,6 @@ class LibdocXmlWriter:
|
|
|
26
26
|
self._write_start(libdoc, writer)
|
|
27
27
|
self._write_keywords('inits', 'init', libdoc.inits, libdoc.source, writer)
|
|
28
28
|
self._write_keywords('keywords', 'kw', libdoc.keywords, libdoc.source, writer)
|
|
29
|
-
# Write deprecated '<datatypes>' element.
|
|
30
|
-
self._write_data_types(libdoc.type_docs, writer)
|
|
31
|
-
# Write new '<types>' element.
|
|
32
29
|
self._write_type_docs(libdoc.type_docs, writer)
|
|
33
30
|
self._write_end(writer)
|
|
34
31
|
|
|
@@ -38,7 +35,7 @@ class LibdocXmlWriter:
|
|
|
38
35
|
'format': libdoc.doc_format,
|
|
39
36
|
'scope': libdoc.scope,
|
|
40
37
|
'generated': get_generation_time(),
|
|
41
|
-
'specversion': '
|
|
38
|
+
'specversion': '6'}
|
|
42
39
|
self._add_source_info(attrs, libdoc)
|
|
43
40
|
writer.start('keywordspec', attrs)
|
|
44
41
|
writer.element('version', libdoc.version)
|
|
@@ -57,8 +54,9 @@ class LibdocXmlWriter:
|
|
|
57
54
|
attrs = self._get_start_attrs(kw, lib_source)
|
|
58
55
|
writer.start(kw_type, attrs)
|
|
59
56
|
self._write_arguments(kw, writer)
|
|
57
|
+
self._write_return_type(kw, writer)
|
|
60
58
|
writer.element('doc', kw.doc)
|
|
61
|
-
writer.element('shortdoc', kw.
|
|
59
|
+
writer.element('shortdoc', kw.short_doc)
|
|
62
60
|
if kw_type == 'kw' and kw.tags:
|
|
63
61
|
self._write_tags(kw.tags, writer)
|
|
64
62
|
writer.end(kw_type)
|
|
@@ -80,24 +78,29 @@ class LibdocXmlWriter:
|
|
|
80
78
|
writer.element('name', arg.name)
|
|
81
79
|
if arg.type:
|
|
82
80
|
self._write_type_info(arg.type, kw.type_docs[arg.name], writer)
|
|
83
|
-
if arg.default is not
|
|
81
|
+
if arg.default is not NOT_SET:
|
|
84
82
|
writer.element('default', arg.default_repr)
|
|
85
83
|
writer.end('arg')
|
|
86
84
|
writer.end('arguments')
|
|
87
85
|
|
|
88
|
-
def _write_type_info(self, type_info: TypeInfo, type_docs: dict, writer,
|
|
86
|
+
def _write_type_info(self, type_info: TypeInfo, type_docs: dict, writer, element='type'):
|
|
89
87
|
attrs = {'name': type_info.name}
|
|
90
88
|
if type_info.is_union:
|
|
91
89
|
attrs['union'] = 'true'
|
|
92
90
|
if type_info.name in type_docs:
|
|
93
91
|
attrs['typedoc'] = type_docs[type_info.name]
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
if type_info.nested:
|
|
93
|
+
writer.start(element, attrs)
|
|
94
|
+
for nested in type_info.nested:
|
|
95
|
+
self._write_type_info(nested, type_docs, writer)
|
|
96
|
+
writer.end(element)
|
|
97
|
+
else:
|
|
98
|
+
writer.element(element, attrs=attrs)
|
|
99
|
+
|
|
100
|
+
def _write_return_type(self, kw, writer):
|
|
101
|
+
if kw.args.return_type:
|
|
102
|
+
self._write_type_info(kw.args.return_type, kw.type_docs['return'], writer,
|
|
103
|
+
element='returntype')
|
|
101
104
|
|
|
102
105
|
def _get_start_attrs(self, kw, lib_source):
|
|
103
106
|
attrs = {'name': kw.name}
|
|
@@ -108,29 +111,6 @@ class LibdocXmlWriter:
|
|
|
108
111
|
self._add_source_info(attrs, kw, lib_source)
|
|
109
112
|
return attrs
|
|
110
113
|
|
|
111
|
-
# Write legacy 'datatypes'. TODO: Remove in RF 7.
|
|
112
|
-
def _write_data_types(self, types, writer):
|
|
113
|
-
enums = sorted(t for t in types if t.type == 'Enum')
|
|
114
|
-
typed_dicts = sorted(t for t in types if t.type == 'TypedDict')
|
|
115
|
-
writer.start('datatypes')
|
|
116
|
-
if enums:
|
|
117
|
-
writer.start('enums')
|
|
118
|
-
for enum in enums:
|
|
119
|
-
writer.start('enum', {'name': enum.name})
|
|
120
|
-
writer.element('doc', enum.doc)
|
|
121
|
-
self._write_enum_members(enum, writer)
|
|
122
|
-
writer.end('enum')
|
|
123
|
-
writer.end('enums')
|
|
124
|
-
if typed_dicts:
|
|
125
|
-
writer.start('typeddicts')
|
|
126
|
-
for typ_dict in typed_dicts:
|
|
127
|
-
writer.start('typeddict', {'name': typ_dict.name})
|
|
128
|
-
writer.element('doc', typ_dict.doc)
|
|
129
|
-
self._write_typed_dict_items(typ_dict, writer)
|
|
130
|
-
writer.end('typeddict')
|
|
131
|
-
writer.end('typeddicts')
|
|
132
|
-
writer.end('datatypes')
|
|
133
|
-
|
|
134
114
|
def _write_type_docs(self, type_docs, writer):
|
|
135
115
|
writer.start('typedocs')
|
|
136
116
|
for doc in sorted(type_docs):
|