robotframework 6.1rc1__zip → 7.0a1__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/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/interfaces.py +36 -49
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/control.py +155 -85
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modelobject.py +2 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testsuite.py +43 -24
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/run.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +210 -220
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +15 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +15 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/model.py +156 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +35 -39
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/tasks.py +6 -6
- 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/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
{robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py
RENAMED
|
@@ -22,13 +22,17 @@ from enum import Enum
|
|
|
22
22
|
from numbers import Integral, Real
|
|
23
23
|
from os import PathLike
|
|
24
24
|
from pathlib import Path, PurePath
|
|
25
|
-
from typing import Any,
|
|
25
|
+
from typing import Any, TYPE_CHECKING, Union
|
|
26
26
|
|
|
27
|
-
from robot.conf import Languages
|
|
27
|
+
from robot.conf import Languages, LanguagesLike
|
|
28
28
|
from robot.libraries.DateTime import convert_date, convert_time
|
|
29
|
-
from robot.utils import (eq, get_error_message,
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
from robot.utils import (eq, get_error_message, is_string, plural_or_not as s,
|
|
30
|
+
safe_str, seq2str, type_name)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
from .customconverters import ConverterInfo, CustomArgumentConverters
|
|
35
|
+
from .typeinfo import TypeInfo, TypedDictInfo
|
|
32
36
|
|
|
33
37
|
|
|
34
38
|
NoneType = type(None)
|
|
@@ -38,99 +42,87 @@ class TypeConverter:
|
|
|
38
42
|
type = None
|
|
39
43
|
type_name = None
|
|
40
44
|
abc = None
|
|
41
|
-
aliases = ()
|
|
42
45
|
value_types = (str,)
|
|
43
46
|
doc = None
|
|
44
47
|
_converters = OrderedDict()
|
|
45
|
-
_type_aliases = {}
|
|
46
48
|
|
|
47
|
-
def __init__(self,
|
|
48
|
-
|
|
49
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
50
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
51
|
+
languages: LanguagesLike = None):
|
|
52
|
+
self.type_info = type_info
|
|
49
53
|
self.custom_converters = custom_converters
|
|
50
54
|
self.languages = languages or Languages()
|
|
51
55
|
|
|
52
56
|
@classmethod
|
|
53
|
-
def register(cls, converter):
|
|
57
|
+
def register(cls, converter: 'type[TypeConverter]') -> 'type[TypeConverter]':
|
|
54
58
|
cls._converters[converter.type] = converter
|
|
55
|
-
for name in (converter.type_name,) + converter.aliases:
|
|
56
|
-
if name is not None and not isinstance(name, property):
|
|
57
|
-
cls._type_aliases[name.lower()] = converter.type
|
|
58
59
|
return converter
|
|
59
60
|
|
|
60
61
|
@classmethod
|
|
61
|
-
def converter_for(cls,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
def converter_for(cls, type_info: 'TypeInfo',
|
|
63
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
64
|
+
languages: LanguagesLike = None) -> 'TypeConverter|None':
|
|
65
|
+
if type_info.type is None:
|
|
65
66
|
return None
|
|
66
|
-
if isinstance(type_, str):
|
|
67
|
-
try:
|
|
68
|
-
type_ = cls._type_aliases[type_.lower()]
|
|
69
|
-
except KeyError:
|
|
70
|
-
return None
|
|
71
|
-
used_type = type_
|
|
72
|
-
if getattr(type_, '__origin__', None) and type_.__origin__ is not Union:
|
|
73
|
-
type_ = type_.__origin__
|
|
74
67
|
if custom_converters:
|
|
75
|
-
info = custom_converters.get_converter_info(
|
|
68
|
+
info = custom_converters.get_converter_info(type_info.type)
|
|
76
69
|
if info:
|
|
77
|
-
return CustomConverter(
|
|
78
|
-
if
|
|
79
|
-
return cls._converters[
|
|
70
|
+
return CustomConverter(type_info, info)
|
|
71
|
+
if type_info.type in cls._converters:
|
|
72
|
+
return cls._converters[type_info.type](type_info, custom_converters, languages)
|
|
80
73
|
for converter in cls._converters.values():
|
|
81
|
-
if converter.handles(
|
|
82
|
-
return converter(
|
|
74
|
+
if converter.handles(type_info):
|
|
75
|
+
return converter(type_info, custom_converters, languages)
|
|
83
76
|
return None
|
|
84
77
|
|
|
85
78
|
@classmethod
|
|
86
|
-
def handles(cls,
|
|
79
|
+
def handles(cls, type_info: 'TypeInfo') -> bool:
|
|
87
80
|
handled = (cls.type, cls.abc) if cls.abc else cls.type
|
|
88
|
-
return isinstance(
|
|
81
|
+
return isinstance(type_info.type, type) and issubclass(type_info.type, handled)
|
|
89
82
|
|
|
90
|
-
def convert(self,
|
|
83
|
+
def convert(self, value: Any,
|
|
84
|
+
name: 'str|None' = None,
|
|
85
|
+
kind: str = 'Argument') -> Any:
|
|
91
86
|
if self.no_conversion_needed(value):
|
|
92
87
|
return value
|
|
93
88
|
if not self._handles_value(value):
|
|
94
|
-
return self._handle_error(
|
|
89
|
+
return self._handle_error(value, name, kind)
|
|
95
90
|
try:
|
|
96
91
|
if not isinstance(value, str):
|
|
97
|
-
return self._non_string_convert(value
|
|
98
|
-
return self._convert(value
|
|
92
|
+
return self._non_string_convert(value)
|
|
93
|
+
return self._convert(value)
|
|
99
94
|
except ValueError as error:
|
|
100
|
-
return self._handle_error(
|
|
95
|
+
return self._handle_error(value, name, kind, error)
|
|
101
96
|
|
|
102
|
-
def no_conversion_needed(self, value):
|
|
103
|
-
used_type = getattr(self.used_type, '__origin__', self.used_type)
|
|
97
|
+
def no_conversion_needed(self, value: Any) -> bool:
|
|
104
98
|
try:
|
|
105
|
-
return isinstance(value,
|
|
99
|
+
return isinstance(value, self.type_info.type)
|
|
106
100
|
except TypeError:
|
|
107
101
|
# Used type wasn't a class. Compare to generic type instead.
|
|
108
|
-
if self.type and self.type is not self.
|
|
102
|
+
if self.type and self.type is not self.type_info.type:
|
|
109
103
|
return isinstance(value, self.type)
|
|
110
104
|
raise
|
|
111
105
|
|
|
112
106
|
def _handles_value(self, value):
|
|
113
107
|
return isinstance(value, self.value_types)
|
|
114
108
|
|
|
115
|
-
def _non_string_convert(self, value
|
|
116
|
-
return self._convert(value
|
|
109
|
+
def _non_string_convert(self, value):
|
|
110
|
+
return self._convert(value)
|
|
117
111
|
|
|
118
|
-
def _convert(self, value
|
|
112
|
+
def _convert(self, value):
|
|
119
113
|
raise NotImplementedError
|
|
120
114
|
|
|
121
|
-
def _handle_error(self,
|
|
122
|
-
if not strict:
|
|
123
|
-
return value
|
|
115
|
+
def _handle_error(self, value, name, kind, error=None):
|
|
124
116
|
value_type = '' if isinstance(value, str) else f' ({type_name(value)})'
|
|
125
117
|
value = safe_str(value)
|
|
126
118
|
ending = f': {error}' if (error and error.args) else '.'
|
|
127
119
|
if name is None:
|
|
128
120
|
raise ValueError(
|
|
129
|
-
f"{kind} '{value}'{value_type} "
|
|
121
|
+
f"{kind.capitalize()} '{value}'{value_type} "
|
|
130
122
|
f"cannot be converted to {self.type_name}{ending}"
|
|
131
123
|
)
|
|
132
124
|
raise ValueError(
|
|
133
|
-
f"{kind} '{name}' got value '{value}'{value_type} that "
|
|
125
|
+
f"{kind.capitalize()} '{name}' got value '{value}'{value_type} that "
|
|
134
126
|
f"cannot be converted to {self.type_name}{ending}"
|
|
135
127
|
)
|
|
136
128
|
|
|
@@ -149,19 +141,6 @@ class TypeConverter:
|
|
|
149
141
|
raise ValueError(f'Value is {type_name(value)}, not {expected.__name__}.')
|
|
150
142
|
return value
|
|
151
143
|
|
|
152
|
-
def _get_nested_types(self, type_hint, expected_count=None):
|
|
153
|
-
types = getattr(type_hint, '__args__', ())
|
|
154
|
-
# With generics from typing like Dict, __args__ is None with Python 3.6 and
|
|
155
|
-
# contains TypeVars with 3.7-3.8. Newer versions don't have __args__ at all.
|
|
156
|
-
# Subscripted usages like Dict[x, y].__args__ work fine with all.
|
|
157
|
-
if not types or all(isinstance(a, TypeVar) for a in types):
|
|
158
|
-
return ()
|
|
159
|
-
if expected_count and len(types) != expected_count:
|
|
160
|
-
raise TypeError(f'{type_hint.__name__}[] construct used as a type hint '
|
|
161
|
-
f'requires exactly {expected_count} nested '
|
|
162
|
-
f'type{s(expected_count)}, got {len(types)}.')
|
|
163
|
-
return types
|
|
164
|
-
|
|
165
144
|
def _remove_number_separators(self, value):
|
|
166
145
|
if is_string(value):
|
|
167
146
|
for sep in ' ', '_':
|
|
@@ -176,14 +155,14 @@ class EnumConverter(TypeConverter):
|
|
|
176
155
|
|
|
177
156
|
@property
|
|
178
157
|
def type_name(self):
|
|
179
|
-
return self.
|
|
158
|
+
return self.type_info.name
|
|
180
159
|
|
|
181
160
|
@property
|
|
182
161
|
def value_types(self):
|
|
183
|
-
return (str, int) if issubclass(self.
|
|
162
|
+
return (str, int) if issubclass(self.type_info.type, int) else (str,)
|
|
184
163
|
|
|
185
|
-
def _convert(self, value
|
|
186
|
-
enum = self.
|
|
164
|
+
def _convert(self, value):
|
|
165
|
+
enum = self.type_info.type
|
|
187
166
|
if isinstance(value, int):
|
|
188
167
|
return self._find_by_int_value(enum, value)
|
|
189
168
|
try:
|
|
@@ -193,14 +172,14 @@ class EnumConverter(TypeConverter):
|
|
|
193
172
|
|
|
194
173
|
def _find_by_normalized_name_or_int_value(self, enum, value):
|
|
195
174
|
members = sorted(enum.__members__)
|
|
196
|
-
matches = [m for m in members if eq(m, value, ignore='_')]
|
|
175
|
+
matches = [m for m in members if eq(m, value, ignore='_-')]
|
|
197
176
|
if len(matches) == 1:
|
|
198
177
|
return getattr(enum, matches[0])
|
|
199
178
|
if len(matches) > 1:
|
|
200
179
|
raise ValueError(f"{self.type_name} has multiple members matching "
|
|
201
180
|
f"'{value}'. Available: {seq2str(matches)}")
|
|
202
181
|
try:
|
|
203
|
-
if issubclass(self.
|
|
182
|
+
if issubclass(self.type_info.type, int):
|
|
204
183
|
return self._find_by_int_value(enum, value)
|
|
205
184
|
except ValueError:
|
|
206
185
|
members = [f'{m} ({getattr(enum, m)})' for m in members]
|
|
@@ -221,17 +200,16 @@ class EnumConverter(TypeConverter):
|
|
|
221
200
|
class AnyConverter(TypeConverter):
|
|
222
201
|
type = Any
|
|
223
202
|
type_name = 'Any'
|
|
224
|
-
aliases = ('any',)
|
|
225
203
|
value_types = (Any,)
|
|
226
204
|
|
|
227
205
|
@classmethod
|
|
228
|
-
def handles(cls,
|
|
229
|
-
return
|
|
206
|
+
def handles(cls, type_info: 'TypeInfo'):
|
|
207
|
+
return type_info.type is Any
|
|
230
208
|
|
|
231
209
|
def no_conversion_needed(self, value):
|
|
232
210
|
return True
|
|
233
211
|
|
|
234
|
-
def _convert(self, value
|
|
212
|
+
def _convert(self, value):
|
|
235
213
|
return value
|
|
236
214
|
|
|
237
215
|
def _handles_value(self, value):
|
|
@@ -242,15 +220,12 @@ class AnyConverter(TypeConverter):
|
|
|
242
220
|
class StringConverter(TypeConverter):
|
|
243
221
|
type = str
|
|
244
222
|
type_name = 'string'
|
|
245
|
-
aliases = ('string', 'str', 'unicode')
|
|
246
223
|
value_types = (Any,)
|
|
247
224
|
|
|
248
225
|
def _handles_value(self, value):
|
|
249
226
|
return True
|
|
250
227
|
|
|
251
|
-
def _convert(self, value
|
|
252
|
-
if not explicit_type:
|
|
253
|
-
return value
|
|
228
|
+
def _convert(self, value):
|
|
254
229
|
try:
|
|
255
230
|
return str(value)
|
|
256
231
|
except Exception:
|
|
@@ -261,13 +236,12 @@ class StringConverter(TypeConverter):
|
|
|
261
236
|
class BooleanConverter(TypeConverter):
|
|
262
237
|
type = bool
|
|
263
238
|
type_name = 'boolean'
|
|
264
|
-
aliases = ('bool',)
|
|
265
239
|
value_types = (str, int, float, NoneType)
|
|
266
240
|
|
|
267
|
-
def _non_string_convert(self, value
|
|
241
|
+
def _non_string_convert(self, value):
|
|
268
242
|
return value
|
|
269
243
|
|
|
270
|
-
def _convert(self, value
|
|
244
|
+
def _convert(self, value):
|
|
271
245
|
normalized = value.title()
|
|
272
246
|
if normalized == 'None':
|
|
273
247
|
return None
|
|
@@ -283,26 +257,20 @@ class IntegerConverter(TypeConverter):
|
|
|
283
257
|
type = int
|
|
284
258
|
abc = Integral
|
|
285
259
|
type_name = 'integer'
|
|
286
|
-
aliases = ('int', 'long')
|
|
287
260
|
value_types = (str, float)
|
|
288
261
|
|
|
289
|
-
def _non_string_convert(self, value
|
|
262
|
+
def _non_string_convert(self, value):
|
|
290
263
|
if value.is_integer():
|
|
291
264
|
return int(value)
|
|
292
265
|
raise ValueError('Conversion would lose precision.')
|
|
293
266
|
|
|
294
|
-
def _convert(self, value
|
|
267
|
+
def _convert(self, value):
|
|
295
268
|
value = self._remove_number_separators(value)
|
|
296
269
|
value, base = self._get_base(value)
|
|
297
270
|
try:
|
|
298
271
|
return int(value, base)
|
|
299
272
|
except ValueError:
|
|
300
|
-
|
|
301
|
-
try:
|
|
302
|
-
return float(value)
|
|
303
|
-
except ValueError:
|
|
304
|
-
pass
|
|
305
|
-
raise ValueError
|
|
273
|
+
raise ValueError
|
|
306
274
|
|
|
307
275
|
def _get_base(self, value):
|
|
308
276
|
value = value.lower()
|
|
@@ -319,10 +287,9 @@ class FloatConverter(TypeConverter):
|
|
|
319
287
|
type = float
|
|
320
288
|
abc = Real
|
|
321
289
|
type_name = 'float'
|
|
322
|
-
aliases = ('double',)
|
|
323
290
|
value_types = (str, Real)
|
|
324
291
|
|
|
325
|
-
def _convert(self, value
|
|
292
|
+
def _convert(self, value):
|
|
326
293
|
try:
|
|
327
294
|
return float(self._remove_number_separators(value))
|
|
328
295
|
except ValueError:
|
|
@@ -335,7 +302,7 @@ class DecimalConverter(TypeConverter):
|
|
|
335
302
|
type_name = 'decimal'
|
|
336
303
|
value_types = (str, int, float)
|
|
337
304
|
|
|
338
|
-
def _convert(self, value
|
|
305
|
+
def _convert(self, value):
|
|
339
306
|
try:
|
|
340
307
|
return Decimal(self._remove_number_separators(value))
|
|
341
308
|
except InvalidOperation:
|
|
@@ -352,10 +319,10 @@ class BytesConverter(TypeConverter):
|
|
|
352
319
|
type_name = 'bytes'
|
|
353
320
|
value_types = (str, bytearray)
|
|
354
321
|
|
|
355
|
-
def _non_string_convert(self, value
|
|
322
|
+
def _non_string_convert(self, value):
|
|
356
323
|
return bytes(value)
|
|
357
324
|
|
|
358
|
-
def _convert(self, value
|
|
325
|
+
def _convert(self, value):
|
|
359
326
|
try:
|
|
360
327
|
return value.encode('latin-1')
|
|
361
328
|
except UnicodeEncodeError as err:
|
|
@@ -369,10 +336,10 @@ class ByteArrayConverter(TypeConverter):
|
|
|
369
336
|
type_name = 'bytearray'
|
|
370
337
|
value_types = (str, bytes)
|
|
371
338
|
|
|
372
|
-
def _non_string_convert(self, value
|
|
339
|
+
def _non_string_convert(self, value):
|
|
373
340
|
return bytearray(value)
|
|
374
341
|
|
|
375
|
-
def _convert(self, value
|
|
342
|
+
def _convert(self, value):
|
|
376
343
|
try:
|
|
377
344
|
return bytearray(value, 'latin-1')
|
|
378
345
|
except UnicodeEncodeError as err:
|
|
@@ -386,7 +353,7 @@ class DateTimeConverter(TypeConverter):
|
|
|
386
353
|
type_name = 'datetime'
|
|
387
354
|
value_types = (str, int, float)
|
|
388
355
|
|
|
389
|
-
def _convert(self, value
|
|
356
|
+
def _convert(self, value):
|
|
390
357
|
return convert_date(value, result_format='datetime')
|
|
391
358
|
|
|
392
359
|
|
|
@@ -395,7 +362,7 @@ class DateConverter(TypeConverter):
|
|
|
395
362
|
type = date
|
|
396
363
|
type_name = 'date'
|
|
397
364
|
|
|
398
|
-
def _convert(self, value
|
|
365
|
+
def _convert(self, value):
|
|
399
366
|
dt = convert_date(value, result_format='datetime')
|
|
400
367
|
if dt.hour or dt.minute or dt.second or dt.microsecond:
|
|
401
368
|
raise ValueError("Value is datetime, not date.")
|
|
@@ -408,7 +375,7 @@ class TimeDeltaConverter(TypeConverter):
|
|
|
408
375
|
type_name = 'timedelta'
|
|
409
376
|
value_types = (str, int, float)
|
|
410
377
|
|
|
411
|
-
def _convert(self, value
|
|
378
|
+
def _convert(self, value):
|
|
412
379
|
return convert_time(value, result_format='timedelta')
|
|
413
380
|
|
|
414
381
|
|
|
@@ -419,7 +386,7 @@ class PathConverter(TypeConverter):
|
|
|
419
386
|
type_name = 'Path'
|
|
420
387
|
value_types = (str, PurePath)
|
|
421
388
|
|
|
422
|
-
def _convert(self, value
|
|
389
|
+
def _convert(self, value):
|
|
423
390
|
return Path(value)
|
|
424
391
|
|
|
425
392
|
|
|
@@ -429,10 +396,10 @@ class NoneConverter(TypeConverter):
|
|
|
429
396
|
type_name = 'None'
|
|
430
397
|
|
|
431
398
|
@classmethod
|
|
432
|
-
def handles(cls,
|
|
433
|
-
return
|
|
399
|
+
def handles(cls, type_info: 'TypeInfo') -> bool:
|
|
400
|
+
return type_info.type in (NoneType, None)
|
|
434
401
|
|
|
435
|
-
def _convert(self, value
|
|
402
|
+
def _convert(self, value):
|
|
436
403
|
if value.upper() == 'NONE':
|
|
437
404
|
return None
|
|
438
405
|
raise ValueError
|
|
@@ -445,35 +412,34 @@ class ListConverter(TypeConverter):
|
|
|
445
412
|
abc = Sequence
|
|
446
413
|
value_types = (str, Sequence)
|
|
447
414
|
|
|
448
|
-
def __init__(self,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
415
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
416
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
417
|
+
languages: LanguagesLike = None):
|
|
418
|
+
super().__init__(type_info, custom_converters, languages)
|
|
419
|
+
nested = type_info.nested
|
|
420
|
+
if not nested:
|
|
452
421
|
self.converter = None
|
|
453
422
|
else:
|
|
454
|
-
self.type_name =
|
|
455
|
-
self.converter = self.converter_for(
|
|
456
|
-
|
|
457
|
-
@classmethod
|
|
458
|
-
def handles(cls, type_):
|
|
459
|
-
# `type_ is not Tuple` is needed with Python 3.6.
|
|
460
|
-
return super().handles(type_) and type_ is not Tuple
|
|
423
|
+
self.type_name = str(type_info)
|
|
424
|
+
self.converter = self.converter_for(nested[0], custom_converters, languages)
|
|
461
425
|
|
|
462
426
|
def no_conversion_needed(self, value):
|
|
463
|
-
if isinstance(value, str) or
|
|
427
|
+
if isinstance(value, str) or not super().no_conversion_needed(value):
|
|
464
428
|
return False
|
|
465
|
-
|
|
429
|
+
if not self.converter:
|
|
430
|
+
return True
|
|
431
|
+
return all(self.converter.no_conversion_needed(v) for v in value)
|
|
466
432
|
|
|
467
|
-
def _non_string_convert(self, value
|
|
468
|
-
return self._convert_items(list(value)
|
|
433
|
+
def _non_string_convert(self, value):
|
|
434
|
+
return self._convert_items(list(value))
|
|
469
435
|
|
|
470
|
-
def _convert(self, value
|
|
471
|
-
return self._convert_items(self._literal_eval(value, list)
|
|
436
|
+
def _convert(self, value):
|
|
437
|
+
return self._convert_items(self._literal_eval(value, list))
|
|
472
438
|
|
|
473
|
-
def _convert_items(self, value
|
|
439
|
+
def _convert_items(self, value):
|
|
474
440
|
if not self.converter:
|
|
475
441
|
return value
|
|
476
|
-
return [self.converter.convert(
|
|
442
|
+
return [self.converter.convert(v, name=i, kind='Item')
|
|
477
443
|
for i, v in enumerate(value)]
|
|
478
444
|
|
|
479
445
|
|
|
@@ -483,43 +449,53 @@ class TupleConverter(TypeConverter):
|
|
|
483
449
|
type_name = 'tuple'
|
|
484
450
|
value_types = (str, Sequence)
|
|
485
451
|
|
|
486
|
-
def __init__(self,
|
|
487
|
-
|
|
452
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
453
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
454
|
+
languages: LanguagesLike = None):
|
|
455
|
+
super().__init__(type_info, custom_converters, languages)
|
|
488
456
|
self.converters = ()
|
|
489
457
|
self.homogenous = False
|
|
490
|
-
|
|
491
|
-
if not
|
|
458
|
+
nested = type_info.nested
|
|
459
|
+
if not nested:
|
|
492
460
|
return
|
|
493
|
-
if
|
|
494
|
-
|
|
495
|
-
if len(
|
|
461
|
+
if nested[-1].type is Ellipsis:
|
|
462
|
+
nested = nested[:-1]
|
|
463
|
+
if len(nested) != 1:
|
|
496
464
|
raise TypeError(f'Homogenous tuple used as a type hint requires '
|
|
497
|
-
f'exactly one nested type, got {len(
|
|
465
|
+
f'exactly one nested type, got {len(nested)}.')
|
|
498
466
|
self.homogenous = True
|
|
499
|
-
self.type_name =
|
|
467
|
+
self.type_name = str(type_info)
|
|
500
468
|
self.converters = tuple(self.converter_for(t, custom_converters, languages)
|
|
501
|
-
for t in
|
|
469
|
+
or NullConverter() for t in nested)
|
|
502
470
|
|
|
503
471
|
def no_conversion_needed(self, value):
|
|
504
|
-
|
|
472
|
+
if isinstance(value, str) or not super().no_conversion_needed(value):
|
|
473
|
+
return False
|
|
474
|
+
if not self.converters:
|
|
475
|
+
return True
|
|
476
|
+
if self.homogenous:
|
|
477
|
+
return all(self.converters[0].no_conversion_needed(v) for v in value)
|
|
478
|
+
if len(value) != len(self.converters):
|
|
479
|
+
return False
|
|
480
|
+
return all(c.no_conversion_needed(v) for c, v in zip(self.converters, value))
|
|
505
481
|
|
|
506
|
-
def _non_string_convert(self, value
|
|
507
|
-
return self._convert_items(tuple(value)
|
|
482
|
+
def _non_string_convert(self, value):
|
|
483
|
+
return self._convert_items(tuple(value))
|
|
508
484
|
|
|
509
|
-
def _convert(self, value
|
|
510
|
-
return self._convert_items(self._literal_eval(value, tuple)
|
|
485
|
+
def _convert(self, value):
|
|
486
|
+
return self._convert_items(self._literal_eval(value, tuple))
|
|
511
487
|
|
|
512
|
-
def _convert_items(self, value
|
|
488
|
+
def _convert_items(self, value):
|
|
513
489
|
if not self.converters:
|
|
514
490
|
return value
|
|
515
491
|
if self.homogenous:
|
|
516
492
|
conv = self.converters[0]
|
|
517
|
-
return tuple(conv.convert(str(i),
|
|
493
|
+
return tuple(conv.convert(v, name=str(i), kind='Item')
|
|
518
494
|
for i, v in enumerate(value))
|
|
519
495
|
if len(self.converters) != len(value):
|
|
520
496
|
raise ValueError(f'Expected {len(self.converters)} '
|
|
521
497
|
f'item{s(self.converters)}, got {len(value)}.')
|
|
522
|
-
return tuple(conv.convert(
|
|
498
|
+
return tuple(conv.convert(v, name=str(i), kind='Item')
|
|
523
499
|
for i, (conv, v) in enumerate(zip(self.converters, value)))
|
|
524
500
|
|
|
525
501
|
|
|
@@ -527,26 +503,27 @@ class TupleConverter(TypeConverter):
|
|
|
527
503
|
class TypedDictConverter(TypeConverter):
|
|
528
504
|
type = 'TypedDict'
|
|
529
505
|
value_types = (str, Mapping)
|
|
506
|
+
type_info: 'TypedDictInfo'
|
|
530
507
|
|
|
531
|
-
def __init__(self,
|
|
532
|
-
|
|
508
|
+
def __init__(self, type_info: 'TypedDictInfo',
|
|
509
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
510
|
+
languages: LanguagesLike = None):
|
|
511
|
+
super().__init__(type_info, custom_converters, languages)
|
|
533
512
|
self.converters = {n: self.converter_for(t, custom_converters, languages)
|
|
534
|
-
for n, t in
|
|
535
|
-
self.type_name =
|
|
536
|
-
# __required_keys__ is new in Python 3.9.
|
|
537
|
-
self.required_keys = getattr(used_type, '__required_keys__', frozenset())
|
|
513
|
+
for n, t in type_info.annotations.items()}
|
|
514
|
+
self.type_name = type_info.name
|
|
538
515
|
|
|
539
516
|
@classmethod
|
|
540
|
-
def handles(cls,
|
|
541
|
-
return
|
|
517
|
+
def handles(cls, type_info: 'TypeInfo') -> bool:
|
|
518
|
+
return type_info.is_typed_dict
|
|
542
519
|
|
|
543
520
|
def no_conversion_needed(self, value):
|
|
544
521
|
return False
|
|
545
522
|
|
|
546
|
-
def _non_string_convert(self, value
|
|
523
|
+
def _non_string_convert(self, value):
|
|
547
524
|
return self._convert_items(value)
|
|
548
525
|
|
|
549
|
-
def _convert(self, value
|
|
526
|
+
def _convert(self, value):
|
|
550
527
|
return self._convert_items(self._literal_eval(value, dict))
|
|
551
528
|
|
|
552
529
|
def _convert_items(self, value):
|
|
@@ -558,14 +535,14 @@ class TypedDictConverter(TypeConverter):
|
|
|
558
535
|
not_allowed.append(key)
|
|
559
536
|
else:
|
|
560
537
|
if converter:
|
|
561
|
-
value[key] = converter.convert(
|
|
538
|
+
value[key] = converter.convert(value[key], name=key, kind='Item')
|
|
562
539
|
if not_allowed:
|
|
563
540
|
error = f'Item{s(not_allowed)} {seq2str(sorted(not_allowed))} not allowed.'
|
|
564
541
|
available = [key for key in self.converters if key not in value]
|
|
565
542
|
if available:
|
|
566
543
|
error += f' Available item{s(available)}: {seq2str(sorted(available))}'
|
|
567
544
|
raise ValueError(error)
|
|
568
|
-
missing = [key for key in self.
|
|
545
|
+
missing = [key for key in self.type_info.required if key not in value]
|
|
569
546
|
if missing:
|
|
570
547
|
raise ValueError(f"Required item{s(missing)} "
|
|
571
548
|
f"{seq2str(sorted(missing))} missing.")
|
|
@@ -577,46 +554,50 @@ class DictionaryConverter(TypeConverter):
|
|
|
577
554
|
type = dict
|
|
578
555
|
abc = Mapping
|
|
579
556
|
type_name = 'dictionary'
|
|
580
|
-
aliases = ('dict', 'map')
|
|
581
557
|
value_types = (str, Mapping)
|
|
582
558
|
|
|
583
|
-
def __init__(self,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
559
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
560
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
561
|
+
languages: LanguagesLike = None):
|
|
562
|
+
super().__init__(type_info, custom_converters, languages)
|
|
563
|
+
nested = type_info.nested
|
|
564
|
+
if not nested:
|
|
587
565
|
self.converters = ()
|
|
588
566
|
else:
|
|
589
|
-
self.type_name =
|
|
567
|
+
self.type_name = str(type_info)
|
|
590
568
|
self.converters = tuple(self.converter_for(t, custom_converters, languages)
|
|
591
|
-
for t in
|
|
569
|
+
or NullConverter() for t in nested)
|
|
592
570
|
|
|
593
571
|
def no_conversion_needed(self, value):
|
|
594
|
-
|
|
572
|
+
if isinstance(value, str) or not super().no_conversion_needed(value):
|
|
573
|
+
return False
|
|
574
|
+
if not self.converters:
|
|
575
|
+
return True
|
|
576
|
+
no_key_conversion_needed = self.converters[0].no_conversion_needed
|
|
577
|
+
no_value_conversion_needed = self.converters[1].no_conversion_needed
|
|
578
|
+
return all(no_key_conversion_needed(k) and no_value_conversion_needed(v)
|
|
579
|
+
for k, v in value.items())
|
|
595
580
|
|
|
596
|
-
def _non_string_convert(self, value
|
|
581
|
+
def _non_string_convert(self, value):
|
|
597
582
|
if self._used_type_is_dict() and not isinstance(value, dict):
|
|
598
583
|
value = dict(value)
|
|
599
|
-
return self._convert_items(value
|
|
584
|
+
return self._convert_items(value)
|
|
600
585
|
|
|
601
586
|
def _used_type_is_dict(self):
|
|
602
|
-
|
|
603
|
-
return issubclass(used_type, dict)
|
|
587
|
+
return issubclass(self.type_info.type, dict)
|
|
604
588
|
|
|
605
|
-
def _convert(self, value
|
|
606
|
-
return self._convert_items(self._literal_eval(value, dict)
|
|
589
|
+
def _convert(self, value):
|
|
590
|
+
return self._convert_items(self._literal_eval(value, dict))
|
|
607
591
|
|
|
608
|
-
def _convert_items(self, value
|
|
592
|
+
def _convert_items(self, value):
|
|
609
593
|
if not self.converters:
|
|
610
594
|
return value
|
|
611
|
-
convert_key = self.
|
|
612
|
-
convert_value = self.
|
|
613
|
-
return {convert_key(None, k): convert_value(
|
|
595
|
+
convert_key = self._get_converter(self.converters[0], 'Key')
|
|
596
|
+
convert_value = self._get_converter(self.converters[1], 'Item')
|
|
597
|
+
return {convert_key(None, k): convert_value(k, v) for k, v in value.items()}
|
|
614
598
|
|
|
615
|
-
def
|
|
616
|
-
|
|
617
|
-
return lambda name, value: value
|
|
618
|
-
return lambda name, value: converter.convert(name, value, explicit_type,
|
|
619
|
-
kind=kind)
|
|
599
|
+
def _get_converter(self, converter, kind):
|
|
600
|
+
return lambda name, value: converter.convert(value, name, kind=kind)
|
|
620
601
|
|
|
621
602
|
|
|
622
603
|
@TypeConverter.register
|
|
@@ -626,29 +607,34 @@ class SetConverter(TypeConverter):
|
|
|
626
607
|
type_name = 'set'
|
|
627
608
|
value_types = (str, Container)
|
|
628
609
|
|
|
629
|
-
def __init__(self,
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
610
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
611
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
612
|
+
languages: LanguagesLike = None):
|
|
613
|
+
super().__init__(type_info, custom_converters, languages)
|
|
614
|
+
nested = type_info.nested
|
|
615
|
+
if not nested:
|
|
633
616
|
self.converter = None
|
|
634
617
|
else:
|
|
635
|
-
self.type_name =
|
|
636
|
-
self.converter = self.converter_for(
|
|
618
|
+
self.type_name = str(type_info)
|
|
619
|
+
self.converter = self.converter_for(nested[0], custom_converters, languages)
|
|
637
620
|
|
|
638
621
|
def no_conversion_needed(self, value):
|
|
639
|
-
|
|
622
|
+
if isinstance(value, str) or not super().no_conversion_needed(value):
|
|
623
|
+
return False
|
|
624
|
+
if not self.converter:
|
|
625
|
+
return True
|
|
626
|
+
return all(self.converter.no_conversion_needed(v) for v in value)
|
|
640
627
|
|
|
641
|
-
def _non_string_convert(self, value
|
|
642
|
-
return self._convert_items(set(value)
|
|
628
|
+
def _non_string_convert(self, value):
|
|
629
|
+
return self._convert_items(set(value))
|
|
643
630
|
|
|
644
|
-
def _convert(self, value
|
|
645
|
-
return self._convert_items(self._literal_eval(value, set)
|
|
631
|
+
def _convert(self, value):
|
|
632
|
+
return self._convert_items(self._literal_eval(value, set))
|
|
646
633
|
|
|
647
|
-
def _convert_items(self, value
|
|
634
|
+
def _convert_items(self, value):
|
|
648
635
|
if not self.converter:
|
|
649
636
|
return value
|
|
650
|
-
return {self.converter.convert(
|
|
651
|
-
for v in value}
|
|
637
|
+
return {self.converter.convert(v, kind='Item') for v in value}
|
|
652
638
|
|
|
653
639
|
|
|
654
640
|
@TypeConverter.register
|
|
@@ -656,68 +642,61 @@ class FrozenSetConverter(SetConverter):
|
|
|
656
642
|
type = frozenset
|
|
657
643
|
type_name = 'frozenset'
|
|
658
644
|
|
|
659
|
-
def _non_string_convert(self, value
|
|
660
|
-
return frozenset(super()._non_string_convert(value
|
|
645
|
+
def _non_string_convert(self, value):
|
|
646
|
+
return frozenset(super()._non_string_convert(value))
|
|
661
647
|
|
|
662
|
-
def _convert(self, value
|
|
648
|
+
def _convert(self, value):
|
|
663
649
|
# There are issues w/ literal_eval. See self._literal_eval for details.
|
|
664
650
|
if value == 'frozenset()':
|
|
665
651
|
return frozenset()
|
|
666
|
-
return frozenset(super()._convert(value
|
|
652
|
+
return frozenset(super()._convert(value))
|
|
667
653
|
|
|
668
654
|
|
|
669
655
|
@TypeConverter.register
|
|
670
|
-
class
|
|
656
|
+
class UnionConverter(TypeConverter):
|
|
671
657
|
type = Union
|
|
672
658
|
|
|
673
|
-
def __init__(self,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
if not
|
|
680
|
-
|
|
681
|
-
if isinstance(union, tuple):
|
|
682
|
-
return union
|
|
683
|
-
if has_args(union):
|
|
684
|
-
return union.__args__
|
|
685
|
-
return ()
|
|
659
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
660
|
+
custom_converters: 'CustomArgumentConverters|None' = None,
|
|
661
|
+
languages: LanguagesLike = None):
|
|
662
|
+
super().__init__(type_info, custom_converters, languages)
|
|
663
|
+
self.converters = tuple(self.converter_for(info, custom_converters, languages)
|
|
664
|
+
for info in self.type_info.nested)
|
|
665
|
+
if not self.converters:
|
|
666
|
+
raise TypeError('Union used as a type hint cannot be empty.')
|
|
686
667
|
|
|
687
668
|
@property
|
|
688
669
|
def type_name(self):
|
|
689
|
-
if not self.
|
|
670
|
+
if not self.converters:
|
|
690
671
|
return 'union'
|
|
691
|
-
return ' or '.join(type_name
|
|
672
|
+
return ' or '.join(c.type_name for c in self.converters)
|
|
692
673
|
|
|
693
674
|
@classmethod
|
|
694
|
-
def handles(cls,
|
|
695
|
-
return is_union
|
|
675
|
+
def handles(cls, type_info: 'TypeInfo') -> bool:
|
|
676
|
+
return type_info.is_union
|
|
696
677
|
|
|
697
678
|
def _handles_value(self, value):
|
|
698
679
|
return True
|
|
699
680
|
|
|
700
681
|
def no_conversion_needed(self, value):
|
|
701
|
-
for converter,
|
|
682
|
+
for converter, info in zip(self.converters, self.type_info.nested):
|
|
702
683
|
if converter:
|
|
703
684
|
if converter.no_conversion_needed(value):
|
|
704
685
|
return True
|
|
705
686
|
else:
|
|
706
687
|
try:
|
|
707
|
-
if isinstance(value,
|
|
688
|
+
if isinstance(value, info.type):
|
|
708
689
|
return True
|
|
709
690
|
except TypeError:
|
|
710
691
|
pass
|
|
711
692
|
return False
|
|
712
693
|
|
|
713
|
-
def _convert(self, value
|
|
714
|
-
if not self.used_type:
|
|
715
|
-
raise ValueError('Cannot have union without types.')
|
|
694
|
+
def _convert(self, value):
|
|
716
695
|
unrecognized_types = False
|
|
717
696
|
for converter in self.converters:
|
|
718
697
|
if converter:
|
|
719
698
|
try:
|
|
720
|
-
return converter.convert(
|
|
699
|
+
return converter.convert(value)
|
|
721
700
|
except ValueError:
|
|
722
701
|
pass
|
|
723
702
|
else:
|
|
@@ -729,8 +708,10 @@ class CombinedConverter(TypeConverter):
|
|
|
729
708
|
|
|
730
709
|
class CustomConverter(TypeConverter):
|
|
731
710
|
|
|
732
|
-
def __init__(self,
|
|
733
|
-
|
|
711
|
+
def __init__(self, type_info: 'TypeInfo',
|
|
712
|
+
converter_info: 'ConverterInfo',
|
|
713
|
+
languages: LanguagesLike = None):
|
|
714
|
+
super().__init__(type_info, languages=languages)
|
|
734
715
|
self.converter_info = converter_info
|
|
735
716
|
|
|
736
717
|
@property
|
|
@@ -748,10 +729,19 @@ class CustomConverter(TypeConverter):
|
|
|
748
729
|
def _handles_value(self, value):
|
|
749
730
|
return not self.value_types or isinstance(value, self.value_types)
|
|
750
731
|
|
|
751
|
-
def _convert(self, value
|
|
732
|
+
def _convert(self, value):
|
|
752
733
|
try:
|
|
753
734
|
return self.converter_info.convert(value)
|
|
754
735
|
except ValueError:
|
|
755
736
|
raise
|
|
756
737
|
except Exception:
|
|
757
738
|
raise ValueError(get_error_message())
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
class NullConverter:
|
|
742
|
+
|
|
743
|
+
def convert(self, value, name, kind='Argument'):
|
|
744
|
+
return value
|
|
745
|
+
|
|
746
|
+
def no_conversion_needed(self, value):
|
|
747
|
+
return True
|