From efe00e17ed74b83d6e4d4bb561fbf18f95eae178 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 4 Dec 2024 09:34:52 +0100 Subject: [PATCH] Refresh the parsers with the latest schema-salad codegen --- cwl_utils/parser/cwl_v1_0.py | 2507 +++++++++++++++++++++------ cwl_utils/parser/cwl_v1_1.py | 2851 ++++++++++++++++++++++++------- cwl_utils/parser/cwl_v1_2.py | 3131 +++++++++++++++++++++++++++------- requirements.txt | 2 +- 4 files changed, 6728 insertions(+), 1763 deletions(-) diff --git a/cwl_utils/parser/cwl_v1_0.py b/cwl_utils/parser/cwl_v1_0.py index 0e1470b9..366820ec 100644 --- a/cwl_utils/parser/cwl_v1_0.py +++ b/cwl_utils/parser/cwl_v1_0.py @@ -11,21 +11,10 @@ import uuid as _uuid__ # pylint: disable=unused-import # noqa: F401 import xml.sax # nosec from abc import ABC, abstractmethod +from collections.abc import MutableMapping, MutableSequence, Sequence from io import StringIO from itertools import chain -from typing import ( - Any, - Dict, - List, - MutableMapping, - MutableSequence, - Optional, - Sequence, - Tuple, - Type, - Union, - cast, -) +from typing import Any, Optional, Union, cast from urllib.parse import quote, urldefrag, urlparse, urlsplit, urlunsplit from urllib.request import pathname2url @@ -38,13 +27,13 @@ from schema_salad.sourceline import SourceLine, add_lc_filename from schema_salad.utils import CacheType, yaml_no_ts # requires schema-salad v8.2+ -_vocab: Dict[str, str] = {} -_rvocab: Dict[str, str] = {} +_vocab: dict[str, str] = {} +_rvocab: dict[str, str] = {} _logger = logging.getLogger("salad") -IdxType = MutableMapping[str, Tuple[Any, "LoadingOptions"]] +IdxType = MutableMapping[str, tuple[Any, "LoadingOptions"]] class LoadingOptions: @@ -56,27 +45,27 @@ class LoadingOptions: original_doc: Optional[Any] addl_metadata: MutableMapping[str, Any] fetcher: Fetcher - vocab: Dict[str, str] - rvocab: Dict[str, str] + vocab: dict[str, str] + rvocab: dict[str, str] cache: CacheType - imports: List[str] - includes: List[str] + imports: list[str] + includes: list[str] no_link_check: Optional[bool] container: Optional[str] def __init__( self, fetcher: Optional[Fetcher] = None, - namespaces: Optional[Dict[str, str]] = None, - schemas: Optional[List[str]] = None, + namespaces: Optional[dict[str, str]] = None, + schemas: Optional[list[str]] = None, fileuri: Optional[str] = None, copyfrom: Optional["LoadingOptions"] = None, original_doc: Optional[Any] = None, - addl_metadata: Optional[Dict[str, str]] = None, + addl_metadata: Optional[dict[str, str]] = None, baseuri: Optional[str] = None, idx: Optional[IdxType] = None, - imports: Optional[List[str]] = None, - includes: Optional[List[str]] = None, + imports: Optional[list[str]] = None, + includes: Optional[list[str]] = None, no_link_check: Optional[bool] = None, container: Optional[str] = None, ) -> None: @@ -216,16 +205,16 @@ def fromDoc( @abstractmethod def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Convert this object to a JSON/YAML friendly dictionary.""" def load_field( - val: Union[str, Dict[str, str]], + val: Union[str, dict[str, str]], fieldtype: "_Loader", baseuri: str, loadingOptions: LoadingOptions, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: """Load field.""" if isinstance(val, MutableMapping): @@ -252,7 +241,7 @@ def load_field( save_type = Optional[Union[MutableMapping[str, Any], MutableSequence[Any], int, float, bool, str]] -def extract_type(val_type: Type[Any]) -> str: +def extract_type(val_type: type[Any]) -> str: """Take a type of value, and extracts the value as a string.""" val_str = str(val_type) return val_str.split("'")[1] @@ -271,7 +260,7 @@ def convert_typing(val_type: str) -> str: return val_type -def parse_errors(error_message: str) -> Tuple[str, str, str]: +def parse_errors(error_message: str) -> tuple[str, str, str]: """Parse error messages from several loaders into one error message.""" if not error_message.startswith("Expected"): return error_message, "", "" @@ -431,7 +420,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: pass @@ -443,7 +432,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc is not None: return doc @@ -451,7 +440,7 @@ def load( class _PrimitiveLoader(_Loader): - def __init__(self, tp: Union[type, Tuple[Type[str], Type[str]]]) -> None: + def __init__(self, tp: Union[type, tuple[type[str], type[str]]]) -> None: self.tp = tp def load( @@ -460,7 +449,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, self.tp): raise ValidationException(f"Expected a {self.tp} but got {doc.__class__.__name__}") @@ -480,16 +469,16 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableSequence): raise ValidationException( f"Value is a {convert_typing(extract_type(type(doc)))}, " f"but valid type for this field is an array." ) - r: List[Any] = [] - errors: List[SchemaSaladException] = [] - fields: List[str] = [] + r: list[Any] = [] + errors: list[SchemaSaladException] = [] + fields: list[str] = [] for i in range(0, len(doc)): try: lf = load_field( @@ -546,7 +535,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException(f"Expected a map, was {type(doc)}") @@ -554,8 +543,8 @@ def load( loadingOptions = LoadingOptions( copyfrom=loadingOptions, container=self.container, no_link_check=self.no_link_check ) - r: Dict[str, Any] = {} - errors: List[SchemaSaladException] = [] + r: dict[str, Any] = {} + errors: list[SchemaSaladException] = [] for k, v in doc.items(): try: lf = load_field(v, self.values, baseuri, loadingOptions, lc) @@ -581,7 +570,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc in self.symbols: return doc @@ -601,9 +590,9 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: - r: List[Dict[str, Any]] = [] + r: list[dict[str, Any]] = [] if isinstance(doc, MutableSequence): for d in doc: if isinstance(d, str): @@ -612,7 +601,7 @@ def load( else: r.append({"pattern": d}) elif isinstance(d, dict): - new_dict: Dict[str, Any] = {} + new_dict: dict[str, Any] = {} dict_copy = copy.deepcopy(d) if "pattern" in dict_copy: new_dict["pattern"] = dict_copy.pop("pattern") @@ -666,7 +655,7 @@ def load( class _RecordLoader(_Loader): def __init__( self, - classtype: Type[Saveable], + classtype: type[Saveable], container: Optional[str] = None, no_link_check: Optional[bool] = None, ) -> None: @@ -680,7 +669,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException( @@ -698,7 +687,7 @@ def __repr__(self) -> str: class _ExpressionLoader(_Loader): - def __init__(self, items: Type[str]) -> None: + def __init__(self, items: type[str]) -> None: self.items = items def load( @@ -707,7 +696,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, str): raise ValidationException( @@ -731,7 +720,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: errors = [] @@ -763,7 +752,7 @@ def load( if "id" in lc: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, "id", str), [e], ) @@ -771,7 +760,7 @@ def load( else: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, doc.get("id"), str), [e], ) @@ -828,7 +817,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if self.no_link_check is not None: loadingOptions = LoadingOptions( @@ -886,7 +875,7 @@ def resolve( doc: str, baseuri: str, loadingOptions: LoadingOptions, - ) -> Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str]: + ) -> Union[list[Union[dict[str, Any], str]], dict[str, Any], str]: doc_ = doc optional = False if doc_.endswith("?"): @@ -895,7 +884,7 @@ def resolve( if doc_.endswith("[]"): salad_versions = [int(v) for v in self.salad_version[1:].split(".")] - items: Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str] = "" + items: Union[list[Union[dict[str, Any], str]], dict[str, Any], str] = "" rest = doc_[0:-2] if salad_versions < [1, 3]: if rest.endswith("[]"): @@ -907,7 +896,7 @@ def resolve( items = self.resolve(rest, baseuri, loadingOptions) if isinstance(items, str): items = expand_url(items, baseuri, loadingOptions, False, True, self.refScope) - expanded: Union[Dict[str, Any], str] = {"type": "array", "items": items} + expanded: Union[dict[str, Any], str] = {"type": "array", "items": items} else: expanded = expand_url(doc_, baseuri, loadingOptions, False, True, self.refScope) @@ -922,10 +911,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableSequence): - r: List[Any] = [] + r: list[Any] = [] for d in doc: if isinstance(d, str): resolved = self.resolve(d, baseuri, loadingOptions) @@ -957,10 +946,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableMapping): - r: List[Any] = [] + r: list[Any] = [] for k in sorted(doc.keys()): val = doc[k] if isinstance(val, CommentedMap): @@ -990,7 +979,7 @@ def _document_load( baseuri: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if isinstance(doc, str): return _document_load_by_url( loader, @@ -1059,7 +1048,7 @@ def _document_load_by_url( url: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if url in loadingOptions.idx: return loadingOptions.idx[url] @@ -1101,7 +1090,7 @@ def file_uri(path: str, split_frag: bool = False) -> str: return f"file://{urlpath}{frag}" -def prefix_url(url: str, namespaces: Dict[str, str]) -> str: +def prefix_url(url: str, namespaces: dict[str, str]) -> str: """Expand short forms into full URLs using the given namespace dictionary.""" for k, v in namespaces.items(): if url.startswith(v): @@ -1178,7 +1167,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1241,13 +1230,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1258,6 +1251,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1291,13 +1286,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1308,6 +1307,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1333,13 +1334,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1350,9 +1355,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1388,8 +1395,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1425,7 +1432,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1483,13 +1490,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1500,6 +1511,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1525,13 +1538,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1542,9 +1559,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1578,8 +1597,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1618,7 +1637,7 @@ def __init__( symbols: Any, type_: Any, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1681,13 +1700,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1698,6 +1721,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1732,13 +1757,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1749,6 +1778,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1774,13 +1805,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1791,9 +1826,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1829,8 +1866,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1865,7 +1902,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1924,13 +1961,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1941,6 +1982,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1966,13 +2009,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1983,9 +2030,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2019,8 +2068,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2052,7 +2101,7 @@ def __init__( self, type_: Any, values: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2111,13 +2160,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2128,6 +2181,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2153,13 +2208,17 @@ def fromDoc( ) ) else: + val = _doc.get("values") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("values")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2170,9 +2229,11 @@ def fromDoc( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [e], + detailed_message=f"the `values` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2206,8 +2267,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2239,7 +2300,7 @@ def __init__( self, names: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2298,13 +2359,17 @@ def fromDoc( ) ) else: + val = _doc.get("names") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("names")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2315,6 +2380,8 @@ def fromDoc( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [e], + detailed_message=f"the `names` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2340,13 +2407,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2357,9 +2428,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2393,8 +2466,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2426,7 +2499,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2485,13 +2558,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2502,6 +2579,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2527,13 +2606,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2544,9 +2627,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2580,8 +2665,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2614,7 +2699,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2677,13 +2762,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2694,6 +2783,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -2727,13 +2818,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2744,6 +2839,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2769,13 +2866,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2786,9 +2887,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2824,8 +2927,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2861,7 +2964,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2919,13 +3022,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2936,6 +3043,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2961,13 +3070,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2978,9 +3091,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3014,8 +3129,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3127,7 +3242,7 @@ def __init__( secondaryFiles: Optional[Any] = None, format: Optional[Any] = None, contents: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3229,13 +3344,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3246,6 +3365,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3270,13 +3391,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3287,6 +3412,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3311,13 +3438,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3328,6 +3459,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) dirname = None @@ -3352,13 +3485,17 @@ def fromDoc( ) ) else: + val = _doc.get("dirname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dirname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3369,6 +3506,8 @@ def fromDoc( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [e], + detailed_message=f"the `dirname` field with value `{val}` " + "is not valid because:", ) ) nameroot = None @@ -3393,13 +3532,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameroot") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameroot")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3410,6 +3553,8 @@ def fromDoc( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [e], + detailed_message=f"the `nameroot` field with value `{val}` " + "is not valid because:", ) ) nameext = None @@ -3434,13 +3579,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameext") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameext")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3451,6 +3600,8 @@ def fromDoc( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [e], + detailed_message=f"the `nameext` field with value `{val}` " + "is not valid because:", ) ) checksum = None @@ -3475,13 +3626,17 @@ def fromDoc( ) ) else: + val = _doc.get("checksum") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("checksum")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3492,6 +3647,8 @@ def fromDoc( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [e], + detailed_message=f"the `checksum` field with value `{val}` " + "is not valid because:", ) ) size = None @@ -3516,13 +3673,17 @@ def fromDoc( ) ) else: + val = _doc.get("size") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("size")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3533,6 +3694,8 @@ def fromDoc( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [e], + detailed_message=f"the `size` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -3557,13 +3720,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3574,6 +3741,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -3598,13 +3767,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3615,6 +3788,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) contents = None @@ -3639,13 +3814,17 @@ def fromDoc( ) ) else: + val = _doc.get("contents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("contents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3656,9 +3835,11 @@ def fromDoc( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [e], + detailed_message=f"the `contents` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3701,8 +3882,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3837,7 +4018,7 @@ def __init__( path: Optional[Any] = None, basename: Optional[Any] = None, listing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3912,13 +4093,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3929,6 +4114,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3953,13 +4140,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3970,6 +4161,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3994,13 +4187,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4011,6 +4208,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) listing = None @@ -4035,13 +4234,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4052,9 +4255,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4090,8 +4295,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4164,7 +4369,7 @@ def __init__( doc: Optional[Any] = None, inputBinding: Optional[Any] = None, label: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4231,13 +4436,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4248,6 +4457,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -4281,13 +4492,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4298,6 +4513,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -4323,13 +4540,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4340,6 +4561,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -4364,13 +4587,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4381,6 +4608,8 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -4405,13 +4634,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4422,9 +4655,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4462,8 +4697,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4512,7 +4747,7 @@ def __init__( fields: Optional[Any] = None, label: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4577,13 +4812,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4594,6 +4833,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -4627,13 +4868,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4644,6 +4889,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -4669,13 +4916,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4686,6 +4937,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -4710,13 +4963,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4727,9 +4984,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4766,8 +5025,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4810,7 +5069,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4879,13 +5138,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4896,6 +5159,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -4930,13 +5195,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4947,6 +5216,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -4972,13 +5243,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4989,6 +5264,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5013,13 +5290,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5030,6 +5311,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -5054,13 +5337,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5071,9 +5358,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5111,8 +5400,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5160,7 +5449,7 @@ def __init__( type_: Any, label: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5226,13 +5515,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5243,6 +5536,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5268,13 +5563,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5285,6 +5584,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5309,13 +5610,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5326,6 +5631,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -5350,13 +5657,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5367,9 +5678,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5405,8 +5718,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5451,7 +5764,7 @@ def __init__( type_: Any, doc: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5516,13 +5829,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5533,6 +5850,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5566,13 +5885,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5583,6 +5906,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5608,13 +5933,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5625,6 +5954,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -5649,13 +5980,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5666,9 +6001,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5705,8 +6042,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5750,7 +6087,7 @@ def __init__( type_: Any, fields: Optional[Any] = None, label: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5813,13 +6150,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5830,6 +6171,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5855,13 +6198,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5872,6 +6219,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5896,13 +6245,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5913,9 +6266,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5950,8 +6305,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5991,7 +6346,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6060,13 +6415,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6077,6 +6436,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6111,13 +6472,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6128,6 +6493,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6153,13 +6520,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6170,6 +6541,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6194,13 +6567,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6211,6 +6588,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -6235,13 +6614,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6252,9 +6635,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6292,8 +6677,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6341,7 +6726,7 @@ def __init__( type_: Any, label: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6407,13 +6792,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6424,6 +6813,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6449,13 +6840,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6466,6 +6861,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6490,13 +6887,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6507,6 +6908,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -6531,13 +6934,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6548,9 +6955,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6586,8 +6995,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6637,7 +7046,7 @@ def __init__( inputBinding: Optional[Any] = None, default: Optional[Any] = None, type_: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6724,13 +7133,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6741,6 +7154,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -6774,13 +7189,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6791,6 +7210,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -6815,13 +7236,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6832,6 +7257,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -6856,13 +7283,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6873,6 +7304,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -6897,13 +7330,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6914,6 +7351,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -6938,13 +7377,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6955,6 +7398,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -6979,13 +7424,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6996,6 +7445,8 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -7020,13 +7471,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7037,6 +7492,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) type_ = None @@ -7061,13 +7518,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7078,9 +7539,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7122,8 +7585,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7208,7 +7671,7 @@ def __init__( doc: Optional[Any] = None, outputBinding: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7289,13 +7752,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7306,6 +7773,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -7339,13 +7808,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7356,6 +7829,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -7380,13 +7855,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7397,6 +7876,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -7421,13 +7902,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7438,6 +7923,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -7462,13 +7949,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7479,6 +7970,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -7503,13 +7996,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7520,6 +8017,8 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -7544,13 +8043,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7561,9 +8064,11 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7603,8 +8108,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7706,7 +8211,7 @@ class InlineJavascriptRequirement(ProcessRequirement): def __init__( self, expressionLib: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7773,13 +8278,17 @@ def fromDoc( ) ) else: + val = _doc.get("expressionLib") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expressionLib")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7790,9 +8299,11 @@ def fromDoc( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [e], + detailed_message=f"the `expressionLib` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7825,8 +8336,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7870,7 +8381,7 @@ class SchemaDefRequirement(ProcessRequirement): def __init__( self, types: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7935,13 +8446,17 @@ def fromDoc( ) ) else: + val = _doc.get("types") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("types")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7952,9 +8467,11 @@ def fromDoc( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [e], + detailed_message=f"the `types` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7987,8 +8504,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8026,7 +8543,7 @@ def __init__( self, envName: Any, envValue: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8087,13 +8604,17 @@ def fromDoc( ) ) else: + val = _doc.get("envName") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envName")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8104,6 +8625,8 @@ def fromDoc( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [e], + detailed_message=f"the `envName` field with value `{val}` " + "is not valid because:", ) ) try: @@ -8129,13 +8652,17 @@ def fromDoc( ) ) else: + val = _doc.get("envValue") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envValue")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8146,9 +8673,11 @@ def fromDoc( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [e], + detailed_message=f"the `envValue` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8182,8 +8711,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8260,7 +8789,7 @@ def __init__( itemSeparator: Optional[Any] = None, valueFrom: Optional[Any] = None, shellQuote: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8341,13 +8870,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8358,6 +8891,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) position = None @@ -8382,13 +8917,17 @@ def fromDoc( ) ) else: + val = _doc.get("position") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("position")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8399,6 +8938,8 @@ def fromDoc( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [e], + detailed_message=f"the `position` field with value `{val}` " + "is not valid because:", ) ) prefix = None @@ -8423,13 +8964,17 @@ def fromDoc( ) ) else: + val = _doc.get("prefix") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("prefix")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8440,6 +8985,8 @@ def fromDoc( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [e], + detailed_message=f"the `prefix` field with value `{val}` " + "is not valid because:", ) ) separate = None @@ -8464,13 +9011,17 @@ def fromDoc( ) ) else: + val = _doc.get("separate") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("separate")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8481,6 +9032,8 @@ def fromDoc( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [e], + detailed_message=f"the `separate` field with value `{val}` " + "is not valid because:", ) ) itemSeparator = None @@ -8505,13 +9058,17 @@ def fromDoc( ) ) else: + val = _doc.get("itemSeparator") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("itemSeparator")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8522,6 +9079,8 @@ def fromDoc( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [e], + detailed_message=f"the `itemSeparator` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -8546,13 +9105,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8563,6 +9126,8 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) shellQuote = None @@ -8587,13 +9152,17 @@ def fromDoc( ) ) else: + val = _doc.get("shellQuote") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("shellQuote")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8604,9 +9173,11 @@ def fromDoc( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [e], + detailed_message=f"the `shellQuote` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8645,8 +9216,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8736,7 +9307,7 @@ def __init__( glob: Optional[Any] = None, loadContents: Optional[Any] = None, outputEval: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8799,13 +9370,17 @@ def fromDoc( ) ) else: + val = _doc.get("glob") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("glob")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8816,6 +9391,8 @@ def fromDoc( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [e], + detailed_message=f"the `glob` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -8840,13 +9417,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8857,6 +9438,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) outputEval = None @@ -8881,13 +9464,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputEval") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputEval")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8898,9 +9485,11 @@ def fromDoc( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [e], + detailed_message=f"the `outputEval` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8935,8 +9524,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8982,7 +9571,7 @@ def __init__( doc: Optional[Any] = None, inputBinding: Optional[Any] = None, label: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9049,13 +9638,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9066,6 +9659,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -9099,13 +9694,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9116,6 +9715,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -9141,13 +9742,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9158,6 +9763,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -9182,13 +9789,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9199,6 +9810,8 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -9223,13 +9836,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9240,9 +9857,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9280,8 +9899,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9330,7 +9949,7 @@ def __init__( fields: Optional[Any] = None, label: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9395,13 +10014,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9412,6 +10035,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -9445,13 +10070,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9462,6 +10091,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -9487,13 +10118,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9504,6 +10139,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -9528,13 +10165,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9545,9 +10186,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9584,8 +10227,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9628,7 +10271,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9697,13 +10340,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9714,6 +10361,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -9748,13 +10397,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9765,6 +10418,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -9790,13 +10445,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9807,6 +10466,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -9831,13 +10492,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9848,6 +10513,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -9872,13 +10539,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9889,9 +10560,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9929,8 +10602,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9978,7 +10651,7 @@ def __init__( type_: Any, label: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10044,13 +10717,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10061,6 +10738,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10086,13 +10765,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10103,6 +10786,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10127,13 +10812,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10144,6 +10833,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -10168,13 +10859,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10185,9 +10880,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10223,8 +10920,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10269,7 +10966,7 @@ def __init__( type_: Any, doc: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10334,13 +11031,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10351,6 +11052,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10384,13 +11087,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10401,6 +11108,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10426,13 +11135,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10443,6 +11156,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -10467,13 +11182,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10484,9 +11203,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10523,8 +11244,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10569,7 +11290,7 @@ def __init__( fields: Optional[Any] = None, label: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10634,13 +11355,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10651,6 +11376,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10684,13 +11411,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10701,6 +11432,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10726,13 +11459,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10743,6 +11480,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10767,13 +11506,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10784,9 +11527,11 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10823,8 +11568,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10867,7 +11612,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10936,13 +11681,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10953,6 +11702,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10987,13 +11738,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11004,6 +11759,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11029,13 +11786,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11046,6 +11807,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11070,13 +11833,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11087,6 +11854,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -11111,13 +11880,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11128,9 +11901,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11168,8 +11943,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11217,7 +11992,7 @@ def __init__( type_: Any, label: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11283,13 +12058,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11300,6 +12079,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11325,13 +12106,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11342,6 +12127,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11366,13 +12153,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11383,6 +12174,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -11407,13 +12200,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11424,9 +12221,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11462,8 +12261,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11517,7 +12316,7 @@ def __init__( inputBinding: Optional[Any] = None, default: Optional[Any] = None, type_: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11604,13 +12403,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11621,6 +12424,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -11654,13 +12459,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11671,6 +12480,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -11695,13 +12506,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11712,6 +12527,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -11736,13 +12553,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11753,6 +12574,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -11777,13 +12600,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11794,6 +12621,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -11818,13 +12647,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11835,6 +12668,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -11859,13 +12694,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11876,6 +12715,8 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -11900,13 +12741,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11917,6 +12762,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) type_ = None @@ -11941,13 +12788,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11958,9 +12809,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12002,8 +12855,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12093,7 +12946,7 @@ def __init__( outputBinding: Optional[Any] = None, format: Optional[Any] = None, type_: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12177,13 +13030,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12194,6 +13051,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -12227,13 +13086,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12244,6 +13107,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -12268,13 +13133,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12285,6 +13154,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -12309,13 +13180,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12326,6 +13201,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12350,13 +13227,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12367,6 +13248,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -12391,13 +13274,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12408,6 +13295,8 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -12432,13 +13321,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12449,6 +13342,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) type_ = None @@ -12473,13 +13368,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12490,9 +13389,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12533,8 +13434,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12628,7 +13529,7 @@ def __init__( successCodes: Optional[Any] = None, temporaryFailCodes: Optional[Any] = None, permanentFailCodes: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12745,13 +13646,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12762,6 +13667,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -12796,13 +13703,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12813,6 +13724,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -12838,13 +13751,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12855,6 +13772,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -12879,13 +13798,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12896,6 +13819,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -12920,13 +13845,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12937,6 +13866,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -12961,13 +13892,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12978,6 +13913,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -13002,13 +13939,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13019,6 +13960,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -13043,13 +13986,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13060,6 +14007,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) baseCommand = None @@ -13084,13 +14033,17 @@ def fromDoc( ) ) else: + val = _doc.get("baseCommand") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("baseCommand")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13101,6 +14054,8 @@ def fromDoc( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [e], + detailed_message=f"the `baseCommand` field with value `{val}` " + "is not valid because:", ) ) arguments = None @@ -13125,13 +14080,17 @@ def fromDoc( ) ) else: + val = _doc.get("arguments") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("arguments")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13142,6 +14101,8 @@ def fromDoc( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [e], + detailed_message=f"the `arguments` field with value `{val}` " + "is not valid because:", ) ) stdin = None @@ -13166,13 +14127,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13183,6 +14148,8 @@ def fromDoc( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [e], + detailed_message=f"the `stdin` field with value `{val}` " + "is not valid because:", ) ) stderr = None @@ -13207,13 +14174,17 @@ def fromDoc( ) ) else: + val = _doc.get("stderr") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stderr")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13224,6 +14195,8 @@ def fromDoc( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [e], + detailed_message=f"the `stderr` field with value `{val}` " + "is not valid because:", ) ) stdout = None @@ -13248,13 +14221,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdout") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdout")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13265,6 +14242,8 @@ def fromDoc( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [e], + detailed_message=f"the `stdout` field with value `{val}` " + "is not valid because:", ) ) successCodes = None @@ -13289,13 +14268,17 @@ def fromDoc( ) ) else: + val = _doc.get("successCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("successCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13306,6 +14289,8 @@ def fromDoc( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [e], + detailed_message=f"the `successCodes` field with value `{val}` " + "is not valid because:", ) ) temporaryFailCodes = None @@ -13330,13 +14315,17 @@ def fromDoc( ) ) else: + val = _doc.get("temporaryFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("temporaryFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13347,6 +14336,8 @@ def fromDoc( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [e], + detailed_message=f"the `temporaryFailCodes` field with value `{val}` " + "is not valid because:", ) ) permanentFailCodes = None @@ -13371,13 +14362,17 @@ def fromDoc( ) ) else: + val = _doc.get("permanentFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("permanentFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13388,9 +14383,11 @@ def fromDoc( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [e], + detailed_message=f"the `permanentFailCodes` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13439,8 +14436,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -13605,7 +14602,7 @@ def __init__( dockerImport: Optional[Any] = None, dockerImageId: Optional[Any] = None, dockerOutputDirectory: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -13692,13 +14689,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerPull") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerPull")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13709,6 +14710,8 @@ def fromDoc( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [e], + detailed_message=f"the `dockerPull` field with value `{val}` " + "is not valid because:", ) ) dockerLoad = None @@ -13733,13 +14736,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerLoad") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerLoad")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13750,6 +14757,8 @@ def fromDoc( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [e], + detailed_message=f"the `dockerLoad` field with value `{val}` " + "is not valid because:", ) ) dockerFile = None @@ -13774,13 +14783,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerFile") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerFile")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13791,6 +14804,8 @@ def fromDoc( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [e], + detailed_message=f"the `dockerFile` field with value `{val}` " + "is not valid because:", ) ) dockerImport = None @@ -13815,13 +14830,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImport") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImport")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13832,6 +14851,8 @@ def fromDoc( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [e], + detailed_message=f"the `dockerImport` field with value `{val}` " + "is not valid because:", ) ) dockerImageId = None @@ -13856,13 +14877,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImageId") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImageId")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13873,6 +14898,8 @@ def fromDoc( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [e], + detailed_message=f"the `dockerImageId` field with value `{val}` " + "is not valid because:", ) ) dockerOutputDirectory = None @@ -13897,13 +14924,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerOutputDirectory") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerOutputDirectory")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13914,9 +14945,11 @@ def fromDoc( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [e], + detailed_message=f"the `dockerOutputDirectory` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13954,8 +14987,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14039,7 +15072,7 @@ class SoftwareRequirement(ProcessRequirement): def __init__( self, packages: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14104,13 +15137,17 @@ def fromDoc( ) ) else: + val = _doc.get("packages") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("packages")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14121,9 +15158,11 @@ def fromDoc( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [e], + detailed_message=f"the `packages` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14156,8 +15195,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14189,7 +15228,7 @@ def __init__( package: Any, version: Optional[Any] = None, specs: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14253,13 +15292,17 @@ def fromDoc( ) ) else: + val = _doc.get("package") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("package")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14270,6 +15313,8 @@ def fromDoc( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [e], + detailed_message=f"the `package` field with value `{val}` " + "is not valid because:", ) ) version = None @@ -14294,13 +15339,17 @@ def fromDoc( ) ) else: + val = _doc.get("version") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("version")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14311,6 +15360,8 @@ def fromDoc( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [e], + detailed_message=f"the `version` field with value `{val}` " + "is not valid because:", ) ) specs = None @@ -14335,13 +15386,17 @@ def fromDoc( ) ) else: + val = _doc.get("specs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("specs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14352,9 +15407,11 @@ def fromDoc( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [e], + detailed_message=f"the `specs` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14389,8 +15446,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14435,7 +15492,7 @@ def __init__( entry: Any, entryname: Optional[Any] = None, writable: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14498,13 +15555,17 @@ def fromDoc( ) ) else: + val = _doc.get("entryname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entryname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14515,6 +15576,8 @@ def fromDoc( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [e], + detailed_message=f"the `entryname` field with value `{val}` " + "is not valid because:", ) ) try: @@ -14540,13 +15603,17 @@ def fromDoc( ) ) else: + val = _doc.get("entry") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entry")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14557,6 +15624,8 @@ def fromDoc( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [e], + detailed_message=f"the `entry` field with value `{val}` " + "is not valid because:", ) ) writable = None @@ -14581,13 +15650,17 @@ def fromDoc( ) ) else: + val = _doc.get("writable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("writable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14598,9 +15671,11 @@ def fromDoc( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [e], + detailed_message=f"the `writable` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14635,8 +15710,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14679,7 +15754,7 @@ class InitialWorkDirRequirement(ProcessRequirement): def __init__( self, listing: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14744,13 +15819,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14761,9 +15840,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14796,8 +15877,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14833,7 +15914,7 @@ class EnvVarRequirement(ProcessRequirement): def __init__( self, envDef: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14898,13 +15979,17 @@ def fromDoc( ) ) else: + val = _doc.get("envDef") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envDef")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14915,9 +16000,11 @@ def fromDoc( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [e], + detailed_message=f"the `envDef` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14950,8 +16037,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14991,7 +16078,7 @@ class ShellCommandRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15032,7 +16119,7 @@ def fromDoc( if _doc.get("class") != "ShellCommandRequirement": raise ValidationException("tried `ShellCommandRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15062,8 +16149,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15120,7 +16207,7 @@ def __init__( tmpdirMax: Optional[Any] = None, outdirMin: Optional[Any] = None, outdirMax: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15213,13 +16300,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15230,6 +16321,8 @@ def fromDoc( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [e], + detailed_message=f"the `coresMin` field with value `{val}` " + "is not valid because:", ) ) coresMax = None @@ -15254,13 +16347,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15271,6 +16368,8 @@ def fromDoc( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [e], + detailed_message=f"the `coresMax` field with value `{val}` " + "is not valid because:", ) ) ramMin = None @@ -15295,13 +16394,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15312,6 +16415,8 @@ def fromDoc( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [e], + detailed_message=f"the `ramMin` field with value `{val}` " + "is not valid because:", ) ) ramMax = None @@ -15336,13 +16441,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15353,6 +16462,8 @@ def fromDoc( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [e], + detailed_message=f"the `ramMax` field with value `{val}` " + "is not valid because:", ) ) tmpdirMin = None @@ -15377,13 +16488,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15394,6 +16509,8 @@ def fromDoc( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [e], + detailed_message=f"the `tmpdirMin` field with value `{val}` " + "is not valid because:", ) ) tmpdirMax = None @@ -15418,13 +16535,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15435,6 +16556,8 @@ def fromDoc( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [e], + detailed_message=f"the `tmpdirMax` field with value `{val}` " + "is not valid because:", ) ) outdirMin = None @@ -15459,13 +16582,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15476,6 +16603,8 @@ def fromDoc( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [e], + detailed_message=f"the `outdirMin` field with value `{val}` " + "is not valid because:", ) ) outdirMax = None @@ -15500,13 +16629,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15517,9 +16650,11 @@ def fromDoc( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [e], + detailed_message=f"the `outdirMax` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15559,8 +16694,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15649,7 +16784,7 @@ def __init__( outputBinding: Optional[Any] = None, format: Optional[Any] = None, type_: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15733,13 +16868,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15750,6 +16889,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -15783,13 +16924,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15800,6 +16945,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -15824,13 +16971,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15841,6 +16992,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -15865,13 +17018,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15882,6 +17039,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -15906,13 +17065,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15923,6 +17086,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -15947,13 +17112,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15964,6 +17133,8 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -15988,13 +17159,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16005,6 +17180,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) type_ = None @@ -16029,13 +17206,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16046,9 +17227,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16089,8 +17272,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16177,7 +17360,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, cwlVersion: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16273,13 +17456,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16290,6 +17477,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -16324,13 +17513,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16341,6 +17534,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -16366,13 +17561,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16383,6 +17582,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -16407,13 +17608,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16424,6 +17629,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -16448,13 +17655,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16465,6 +17676,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -16489,13 +17702,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16506,6 +17723,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -16530,13 +17749,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16547,6 +17770,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -16571,13 +17796,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16588,6 +17817,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) try: @@ -16613,13 +17844,17 @@ def fromDoc( ) ) else: + val = _doc.get("expression") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expression")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16630,9 +17865,11 @@ def fromDoc( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [e], + detailed_message=f"the `expression` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16674,8 +17911,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16770,7 +18007,7 @@ def __init__( outputSource: Optional[Any] = None, linkMerge: Optional[Any] = None, type_: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16860,13 +18097,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16877,6 +18118,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -16910,13 +18153,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16927,6 +18174,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -16951,13 +18200,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16968,6 +18221,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -16992,13 +18247,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17009,6 +18268,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -17033,13 +18294,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17050,6 +18315,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -17074,13 +18341,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17091,6 +18362,8 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -17115,13 +18388,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17132,6 +18409,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) outputSource = None @@ -17156,13 +18435,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputSource") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputSource")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17173,6 +18456,8 @@ def fromDoc( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [e], + detailed_message=f"the `outputSource` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -17197,13 +18482,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17214,6 +18503,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) type_ = None @@ -17238,13 +18529,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17255,9 +18550,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17300,8 +18597,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17435,7 +18732,7 @@ def __init__( linkMerge: Optional[Any] = None, default: Optional[Any] = None, valueFrom: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17504,13 +18801,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17521,6 +18822,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -17554,13 +18857,17 @@ def fromDoc( ) ) else: + val = _doc.get("source") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("source")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17571,6 +18878,8 @@ def fromDoc( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [e], + detailed_message=f"the `source` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -17595,13 +18904,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17612,6 +18925,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -17636,13 +18951,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17653,6 +18972,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -17677,13 +18998,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17694,9 +19019,11 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17734,8 +19061,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17785,7 +19112,7 @@ class WorkflowStepOutput(Saveable): def __init__( self, id: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17842,13 +19169,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17859,6 +19190,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -17870,7 +19203,7 @@ def fromDoc( _errors__.append(ValidationException("missing id")) if not __original_id_is_none: baseuri = cast(str, id) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17902,8 +19235,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17998,7 +19331,7 @@ def __init__( doc: Optional[Any] = None, scatter: Optional[Any] = None, scatterMethod: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18088,13 +19421,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18105,6 +19442,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -18139,13 +19478,17 @@ def fromDoc( ) ) else: + val = _doc.get("in") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("in")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18156,6 +19499,8 @@ def fromDoc( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [e], + detailed_message=f"the `in` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18181,13 +19526,17 @@ def fromDoc( ) ) else: + val = _doc.get("out") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("out")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18198,6 +19547,8 @@ def fromDoc( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [e], + detailed_message=f"the `out` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -18222,13 +19573,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18239,6 +19594,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -18263,13 +19620,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18280,6 +19641,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -18304,13 +19667,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18321,6 +19688,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -18345,13 +19714,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18362,6 +19735,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18387,13 +19762,17 @@ def fromDoc( ) ) else: + val = _doc.get("run") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("run")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18404,6 +19783,8 @@ def fromDoc( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [e], + detailed_message=f"the `run` field with value `{val}` " + "is not valid because:", ) ) scatter = None @@ -18428,13 +19809,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatter") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatter")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18445,6 +19830,8 @@ def fromDoc( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [e], + detailed_message=f"the `scatter` field with value `{val}` " + "is not valid because:", ) ) scatterMethod = None @@ -18469,13 +19856,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatterMethod") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatterMethod")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18486,9 +19877,11 @@ def fromDoc( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [e], + detailed_message=f"the `scatterMethod` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -18531,8 +19924,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -18666,7 +20059,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, cwlVersion: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18762,13 +20155,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18779,6 +20176,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -18813,13 +20212,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18830,6 +20233,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18855,13 +20260,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18872,6 +20281,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -18896,13 +20307,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18913,6 +20328,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -18937,13 +20354,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18954,6 +20375,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -18978,13 +20401,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18995,6 +20422,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -19019,13 +20448,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19036,6 +20469,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -19060,13 +20495,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19077,6 +20516,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19102,13 +20543,17 @@ def fromDoc( ) ) else: + val = _doc.get("steps") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("steps")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19119,9 +20564,11 @@ def fromDoc( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [e], + detailed_message=f"the `steps` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19163,8 +20610,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19245,7 +20692,7 @@ class SubworkflowFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19286,7 +20733,7 @@ def fromDoc( if _doc.get("class") != "SubworkflowFeatureRequirement": raise ValidationException("tried `SubworkflowFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19316,8 +20763,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19348,7 +20795,7 @@ class ScatterFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19389,7 +20836,7 @@ def fromDoc( if _doc.get("class") != "ScatterFeatureRequirement": raise ValidationException("tried `ScatterFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19419,8 +20866,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19451,7 +20898,7 @@ class MultipleInputFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19492,7 +20939,7 @@ def fromDoc( if _doc.get("class") != "MultipleInputFeatureRequirement": raise ValidationException("tried `MultipleInputFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19522,8 +20969,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19554,7 +21001,7 @@ class StepInputExpressionRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19595,7 +21042,7 @@ def fromDoc( if _doc.get("class") != "StepInputExpressionRequirement": raise ValidationException("tried `StepInputExpressionRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19625,8 +21072,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: diff --git a/cwl_utils/parser/cwl_v1_1.py b/cwl_utils/parser/cwl_v1_1.py index 484bf818..3421dfc8 100644 --- a/cwl_utils/parser/cwl_v1_1.py +++ b/cwl_utils/parser/cwl_v1_1.py @@ -11,21 +11,10 @@ import uuid as _uuid__ # pylint: disable=unused-import # noqa: F401 import xml.sax # nosec from abc import ABC, abstractmethod +from collections.abc import MutableMapping, MutableSequence, Sequence from io import StringIO from itertools import chain -from typing import ( - Any, - Dict, - List, - MutableMapping, - MutableSequence, - Optional, - Sequence, - Tuple, - Type, - Union, - cast, -) +from typing import Any, Optional, Union, cast from urllib.parse import quote, urldefrag, urlparse, urlsplit, urlunsplit from urllib.request import pathname2url @@ -38,13 +27,13 @@ from schema_salad.sourceline import SourceLine, add_lc_filename from schema_salad.utils import CacheType, yaml_no_ts # requires schema-salad v8.2+ -_vocab: Dict[str, str] = {} -_rvocab: Dict[str, str] = {} +_vocab: dict[str, str] = {} +_rvocab: dict[str, str] = {} _logger = logging.getLogger("salad") -IdxType = MutableMapping[str, Tuple[Any, "LoadingOptions"]] +IdxType = MutableMapping[str, tuple[Any, "LoadingOptions"]] class LoadingOptions: @@ -56,27 +45,27 @@ class LoadingOptions: original_doc: Optional[Any] addl_metadata: MutableMapping[str, Any] fetcher: Fetcher - vocab: Dict[str, str] - rvocab: Dict[str, str] + vocab: dict[str, str] + rvocab: dict[str, str] cache: CacheType - imports: List[str] - includes: List[str] + imports: list[str] + includes: list[str] no_link_check: Optional[bool] container: Optional[str] def __init__( self, fetcher: Optional[Fetcher] = None, - namespaces: Optional[Dict[str, str]] = None, - schemas: Optional[List[str]] = None, + namespaces: Optional[dict[str, str]] = None, + schemas: Optional[list[str]] = None, fileuri: Optional[str] = None, copyfrom: Optional["LoadingOptions"] = None, original_doc: Optional[Any] = None, - addl_metadata: Optional[Dict[str, str]] = None, + addl_metadata: Optional[dict[str, str]] = None, baseuri: Optional[str] = None, idx: Optional[IdxType] = None, - imports: Optional[List[str]] = None, - includes: Optional[List[str]] = None, + imports: Optional[list[str]] = None, + includes: Optional[list[str]] = None, no_link_check: Optional[bool] = None, container: Optional[str] = None, ) -> None: @@ -216,16 +205,16 @@ def fromDoc( @abstractmethod def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Convert this object to a JSON/YAML friendly dictionary.""" def load_field( - val: Union[str, Dict[str, str]], + val: Union[str, dict[str, str]], fieldtype: "_Loader", baseuri: str, loadingOptions: LoadingOptions, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: """Load field.""" if isinstance(val, MutableMapping): @@ -252,7 +241,7 @@ def load_field( save_type = Optional[Union[MutableMapping[str, Any], MutableSequence[Any], int, float, bool, str]] -def extract_type(val_type: Type[Any]) -> str: +def extract_type(val_type: type[Any]) -> str: """Take a type of value, and extracts the value as a string.""" val_str = str(val_type) return val_str.split("'")[1] @@ -271,7 +260,7 @@ def convert_typing(val_type: str) -> str: return val_type -def parse_errors(error_message: str) -> Tuple[str, str, str]: +def parse_errors(error_message: str) -> tuple[str, str, str]: """Parse error messages from several loaders into one error message.""" if not error_message.startswith("Expected"): return error_message, "", "" @@ -431,7 +420,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: pass @@ -443,7 +432,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc is not None: return doc @@ -451,7 +440,7 @@ def load( class _PrimitiveLoader(_Loader): - def __init__(self, tp: Union[type, Tuple[Type[str], Type[str]]]) -> None: + def __init__(self, tp: Union[type, tuple[type[str], type[str]]]) -> None: self.tp = tp def load( @@ -460,7 +449,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, self.tp): raise ValidationException(f"Expected a {self.tp} but got {doc.__class__.__name__}") @@ -480,16 +469,16 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableSequence): raise ValidationException( f"Value is a {convert_typing(extract_type(type(doc)))}, " f"but valid type for this field is an array." ) - r: List[Any] = [] - errors: List[SchemaSaladException] = [] - fields: List[str] = [] + r: list[Any] = [] + errors: list[SchemaSaladException] = [] + fields: list[str] = [] for i in range(0, len(doc)): try: lf = load_field( @@ -546,7 +535,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException(f"Expected a map, was {type(doc)}") @@ -554,8 +543,8 @@ def load( loadingOptions = LoadingOptions( copyfrom=loadingOptions, container=self.container, no_link_check=self.no_link_check ) - r: Dict[str, Any] = {} - errors: List[SchemaSaladException] = [] + r: dict[str, Any] = {} + errors: list[SchemaSaladException] = [] for k, v in doc.items(): try: lf = load_field(v, self.values, baseuri, loadingOptions, lc) @@ -581,7 +570,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc in self.symbols: return doc @@ -601,9 +590,9 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: - r: List[Dict[str, Any]] = [] + r: list[dict[str, Any]] = [] if isinstance(doc, MutableSequence): for d in doc: if isinstance(d, str): @@ -612,7 +601,7 @@ def load( else: r.append({"pattern": d}) elif isinstance(d, dict): - new_dict: Dict[str, Any] = {} + new_dict: dict[str, Any] = {} dict_copy = copy.deepcopy(d) if "pattern" in dict_copy: new_dict["pattern"] = dict_copy.pop("pattern") @@ -666,7 +655,7 @@ def load( class _RecordLoader(_Loader): def __init__( self, - classtype: Type[Saveable], + classtype: type[Saveable], container: Optional[str] = None, no_link_check: Optional[bool] = None, ) -> None: @@ -680,7 +669,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException( @@ -698,7 +687,7 @@ def __repr__(self) -> str: class _ExpressionLoader(_Loader): - def __init__(self, items: Type[str]) -> None: + def __init__(self, items: type[str]) -> None: self.items = items def load( @@ -707,7 +696,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, str): raise ValidationException( @@ -731,7 +720,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: errors = [] @@ -763,7 +752,7 @@ def load( if "id" in lc: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, "id", str), [e], ) @@ -771,7 +760,7 @@ def load( else: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, doc.get("id"), str), [e], ) @@ -828,7 +817,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if self.no_link_check is not None: loadingOptions = LoadingOptions( @@ -886,7 +875,7 @@ def resolve( doc: str, baseuri: str, loadingOptions: LoadingOptions, - ) -> Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str]: + ) -> Union[list[Union[dict[str, Any], str]], dict[str, Any], str]: doc_ = doc optional = False if doc_.endswith("?"): @@ -895,7 +884,7 @@ def resolve( if doc_.endswith("[]"): salad_versions = [int(v) for v in self.salad_version[1:].split(".")] - items: Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str] = "" + items: Union[list[Union[dict[str, Any], str]], dict[str, Any], str] = "" rest = doc_[0:-2] if salad_versions < [1, 3]: if rest.endswith("[]"): @@ -907,7 +896,7 @@ def resolve( items = self.resolve(rest, baseuri, loadingOptions) if isinstance(items, str): items = expand_url(items, baseuri, loadingOptions, False, True, self.refScope) - expanded: Union[Dict[str, Any], str] = {"type": "array", "items": items} + expanded: Union[dict[str, Any], str] = {"type": "array", "items": items} else: expanded = expand_url(doc_, baseuri, loadingOptions, False, True, self.refScope) @@ -922,10 +911,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableSequence): - r: List[Any] = [] + r: list[Any] = [] for d in doc: if isinstance(d, str): resolved = self.resolve(d, baseuri, loadingOptions) @@ -957,10 +946,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableMapping): - r: List[Any] = [] + r: list[Any] = [] for k in sorted(doc.keys()): val = doc[k] if isinstance(val, CommentedMap): @@ -990,7 +979,7 @@ def _document_load( baseuri: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if isinstance(doc, str): return _document_load_by_url( loader, @@ -1059,7 +1048,7 @@ def _document_load_by_url( url: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if url in loadingOptions.idx: return loadingOptions.idx[url] @@ -1101,7 +1090,7 @@ def file_uri(path: str, split_frag: bool = False) -> str: return f"file://{urlpath}{frag}" -def prefix_url(url: str, namespaces: Dict[str, str]) -> str: +def prefix_url(url: str, namespaces: dict[str, str]) -> str: """Expand short forms into full URLs using the given namespace dictionary.""" for k, v in namespaces.items(): if url.startswith(v): @@ -1178,7 +1167,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1241,13 +1230,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1258,6 +1251,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1291,13 +1286,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1308,6 +1307,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1333,13 +1334,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1350,9 +1355,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1388,8 +1395,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1425,7 +1432,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1483,13 +1490,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1500,6 +1511,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1525,13 +1538,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1542,9 +1559,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1578,8 +1597,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1618,7 +1637,7 @@ def __init__( symbols: Any, type_: Any, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1681,13 +1700,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1698,6 +1721,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1732,13 +1757,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1749,6 +1778,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1774,13 +1805,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1791,9 +1826,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1829,8 +1866,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1865,7 +1902,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1924,13 +1961,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1941,6 +1982,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1966,13 +2009,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1983,9 +2030,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2019,8 +2068,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2052,7 +2101,7 @@ def __init__( self, type_: Any, values: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2111,13 +2160,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2128,6 +2181,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2153,13 +2208,17 @@ def fromDoc( ) ) else: + val = _doc.get("values") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("values")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2170,9 +2229,11 @@ def fromDoc( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [e], + detailed_message=f"the `values` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2206,8 +2267,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2239,7 +2300,7 @@ def __init__( self, names: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2298,13 +2359,17 @@ def fromDoc( ) ) else: + val = _doc.get("names") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("names")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2315,6 +2380,8 @@ def fromDoc( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [e], + detailed_message=f"the `names` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2340,13 +2407,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2357,9 +2428,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2393,8 +2466,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2426,7 +2499,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2485,13 +2558,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2502,6 +2579,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2527,13 +2606,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2544,9 +2627,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2580,8 +2665,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2614,7 +2699,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2677,13 +2762,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2694,6 +2783,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -2727,13 +2818,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2744,6 +2839,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2769,13 +2866,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2786,9 +2887,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2824,8 +2927,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2861,7 +2964,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2919,13 +3022,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2936,6 +3043,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2961,13 +3070,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2978,9 +3091,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3014,8 +3129,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3127,7 +3242,7 @@ def __init__( secondaryFiles: Optional[Any] = None, format: Optional[Any] = None, contents: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3229,13 +3344,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3246,6 +3365,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3270,13 +3391,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3287,6 +3412,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3311,13 +3438,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3328,6 +3459,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) dirname = None @@ -3352,13 +3485,17 @@ def fromDoc( ) ) else: + val = _doc.get("dirname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dirname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3369,6 +3506,8 @@ def fromDoc( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [e], + detailed_message=f"the `dirname` field with value `{val}` " + "is not valid because:", ) ) nameroot = None @@ -3393,13 +3532,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameroot") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameroot")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3410,6 +3553,8 @@ def fromDoc( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [e], + detailed_message=f"the `nameroot` field with value `{val}` " + "is not valid because:", ) ) nameext = None @@ -3434,13 +3579,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameext") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameext")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3451,6 +3600,8 @@ def fromDoc( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [e], + detailed_message=f"the `nameext` field with value `{val}` " + "is not valid because:", ) ) checksum = None @@ -3475,13 +3626,17 @@ def fromDoc( ) ) else: + val = _doc.get("checksum") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("checksum")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3492,6 +3647,8 @@ def fromDoc( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [e], + detailed_message=f"the `checksum` field with value `{val}` " + "is not valid because:", ) ) size = None @@ -3516,13 +3673,17 @@ def fromDoc( ) ) else: + val = _doc.get("size") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("size")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3533,6 +3694,8 @@ def fromDoc( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [e], + detailed_message=f"the `size` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -3557,13 +3720,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3574,6 +3741,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -3598,13 +3767,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3615,6 +3788,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) contents = None @@ -3639,13 +3814,17 @@ def fromDoc( ) ) else: + val = _doc.get("contents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("contents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3656,9 +3835,11 @@ def fromDoc( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [e], + detailed_message=f"the `contents` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3701,8 +3882,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3837,7 +4018,7 @@ def __init__( path: Optional[Any] = None, basename: Optional[Any] = None, listing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3912,13 +4093,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3929,6 +4114,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3953,13 +4140,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3970,6 +4161,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3994,13 +4187,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4011,6 +4208,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) listing = None @@ -4035,13 +4234,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4052,9 +4255,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4090,8 +4295,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4164,7 +4369,7 @@ class InputBinding(Saveable): def __init__( self, loadContents: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4221,13 +4426,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4238,9 +4447,11 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4273,8 +4484,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4325,7 +4536,7 @@ def __init__( format: Optional[Any] = None, loadContents: Optional[Any] = None, loadListing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4412,13 +4623,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4429,6 +4644,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -4462,13 +4679,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4479,6 +4700,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -4504,13 +4727,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4521,6 +4748,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -4545,13 +4774,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4562,6 +4795,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -4586,13 +4821,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4603,6 +4842,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -4627,13 +4868,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4644,6 +4889,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -4668,13 +4915,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4685,6 +4936,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -4709,13 +4962,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4726,6 +4983,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -4750,13 +5009,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4767,9 +5030,11 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4811,8 +5076,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4898,7 +5163,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4965,13 +5230,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4982,6 +5251,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5015,13 +5286,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5032,6 +5307,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5057,13 +5334,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5074,6 +5355,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5098,13 +5381,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5115,6 +5402,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5139,13 +5428,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5156,9 +5449,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5196,8 +5491,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5244,7 +5539,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5311,13 +5606,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5328,6 +5627,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5362,13 +5663,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5379,6 +5684,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5404,13 +5711,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5421,6 +5732,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5445,13 +5758,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5462,6 +5779,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5486,13 +5805,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5503,9 +5826,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5543,8 +5868,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5590,7 +5915,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5657,13 +5982,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5674,6 +6003,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5708,13 +6039,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5725,6 +6060,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5750,13 +6087,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5767,6 +6108,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5791,13 +6134,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5808,6 +6155,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5832,13 +6181,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5849,9 +6202,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5889,8 +6244,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5938,7 +6293,7 @@ def __init__( secondaryFiles: Optional[Any] = None, streamable: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6019,13 +6374,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6036,6 +6395,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6069,13 +6430,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6086,6 +6451,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6111,13 +6478,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6128,6 +6499,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6152,13 +6525,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6169,6 +6546,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -6193,13 +6572,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6210,6 +6593,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -6234,13 +6619,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6251,6 +6640,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -6275,13 +6666,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6292,9 +6687,11 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6334,8 +6731,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6397,7 +6794,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6464,13 +6861,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6481,6 +6882,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6514,13 +6917,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6531,6 +6938,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6556,13 +6965,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6573,6 +6986,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6597,13 +7012,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6614,6 +7033,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -6638,13 +7059,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6655,9 +7080,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6695,8 +7122,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6743,7 +7170,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6810,13 +7237,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6827,6 +7258,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6861,13 +7294,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6878,6 +7315,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6903,13 +7342,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6920,6 +7363,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6944,13 +7389,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6961,6 +7410,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -6985,13 +7436,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7002,9 +7457,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7042,8 +7499,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7089,7 +7546,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7156,13 +7613,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7173,6 +7634,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -7207,13 +7670,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7224,6 +7691,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -7249,13 +7718,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7266,6 +7739,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -7290,13 +7765,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7307,6 +7786,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -7331,13 +7812,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7348,9 +7833,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7388,8 +7875,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7472,7 +7959,7 @@ class InlineJavascriptRequirement(ProcessRequirement): def __init__( self, expressionLib: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7539,13 +8026,17 @@ def fromDoc( ) ) else: + val = _doc.get("expressionLib") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expressionLib")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7556,9 +8047,11 @@ def fromDoc( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [e], + detailed_message=f"the `expressionLib` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7591,8 +8084,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7640,7 +8133,7 @@ class SchemaDefRequirement(ProcessRequirement): def __init__( self, types: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7705,13 +8198,17 @@ def fromDoc( ) ) else: + val = _doc.get("types") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("types")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7722,9 +8219,11 @@ def fromDoc( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [e], + detailed_message=f"the `types` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7757,8 +8256,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7789,7 +8288,7 @@ def __init__( self, pattern: Any, required: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7850,13 +8349,17 @@ def fromDoc( ) ) else: + val = _doc.get("pattern") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("pattern")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `pattern` field is not valid because:", SourceLine(_doc, "pattern", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7867,6 +8370,8 @@ def fromDoc( "the `pattern` field is not valid because:", SourceLine(_doc, "pattern", str), [e], + detailed_message=f"the `pattern` field with value `{val}` " + "is not valid because:", ) ) required = None @@ -7891,13 +8396,17 @@ def fromDoc( ) ) else: + val = _doc.get("required") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("required")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `required` field is not valid because:", SourceLine(_doc, "required", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7908,9 +8417,11 @@ def fromDoc( "the `required` field is not valid because:", SourceLine(_doc, "required", str), [e], + detailed_message=f"the `required` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7944,8 +8455,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7983,7 +8494,7 @@ class LoadListingRequirement(ProcessRequirement): def __init__( self, loadListing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8049,13 +8560,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8066,9 +8581,11 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8101,8 +8618,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8143,7 +8660,7 @@ def __init__( self, envName: Any, envValue: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8204,13 +8721,17 @@ def fromDoc( ) ) else: + val = _doc.get("envName") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envName")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8221,6 +8742,8 @@ def fromDoc( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [e], + detailed_message=f"the `envName` field with value `{val}` " + "is not valid because:", ) ) try: @@ -8246,13 +8769,17 @@ def fromDoc( ) ) else: + val = _doc.get("envValue") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envValue")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8263,9 +8790,11 @@ def fromDoc( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [e], + detailed_message=f"the `envValue` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8299,8 +8828,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8377,7 +8906,7 @@ def __init__( itemSeparator: Optional[Any] = None, valueFrom: Optional[Any] = None, shellQuote: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8458,13 +8987,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8475,6 +9008,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) position = None @@ -8499,13 +9034,17 @@ def fromDoc( ) ) else: + val = _doc.get("position") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("position")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8516,6 +9055,8 @@ def fromDoc( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [e], + detailed_message=f"the `position` field with value `{val}` " + "is not valid because:", ) ) prefix = None @@ -8540,13 +9081,17 @@ def fromDoc( ) ) else: + val = _doc.get("prefix") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("prefix")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8557,6 +9102,8 @@ def fromDoc( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [e], + detailed_message=f"the `prefix` field with value `{val}` " + "is not valid because:", ) ) separate = None @@ -8581,13 +9128,17 @@ def fromDoc( ) ) else: + val = _doc.get("separate") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("separate")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8598,6 +9149,8 @@ def fromDoc( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [e], + detailed_message=f"the `separate` field with value `{val}` " + "is not valid because:", ) ) itemSeparator = None @@ -8622,13 +9175,17 @@ def fromDoc( ) ) else: + val = _doc.get("itemSeparator") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("itemSeparator")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8639,6 +9196,8 @@ def fromDoc( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [e], + detailed_message=f"the `itemSeparator` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -8663,13 +9222,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8680,6 +9243,8 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) shellQuote = None @@ -8704,13 +9269,17 @@ def fromDoc( ) ) else: + val = _doc.get("shellQuote") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("shellQuote")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8721,9 +9290,11 @@ def fromDoc( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [e], + detailed_message=f"the `shellQuote` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8762,8 +9333,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8854,7 +9425,7 @@ def __init__( loadListing: Optional[Any] = None, glob: Optional[Any] = None, outputEval: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8919,13 +9490,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8936,6 +9511,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -8960,13 +9537,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8977,6 +9558,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) glob = None @@ -9001,13 +9584,17 @@ def fromDoc( ) ) else: + val = _doc.get("glob") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("glob")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9018,6 +9605,8 @@ def fromDoc( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [e], + detailed_message=f"the `glob` field with value `{val}` " + "is not valid because:", ) ) outputEval = None @@ -9042,13 +9631,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputEval") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputEval")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9059,9 +9652,11 @@ def fromDoc( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [e], + detailed_message=f"the `outputEval` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9097,8 +9692,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9147,7 +9742,7 @@ class CommandLineBindable(Saveable): def __init__( self, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9204,13 +9799,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9221,9 +9820,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9256,8 +9857,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9297,7 +9898,7 @@ def __init__( loadContents: Optional[Any] = None, loadListing: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9387,13 +9988,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9404,6 +10009,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -9437,13 +10044,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9454,6 +10065,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -9479,13 +10092,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9496,6 +10113,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -9520,13 +10139,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9537,6 +10160,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -9561,13 +10186,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9578,6 +10207,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -9602,13 +10233,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9619,6 +10254,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -9643,13 +10280,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9660,6 +10301,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -9684,13 +10327,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9701,6 +10348,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -9725,13 +10374,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9742,6 +10395,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -9766,13 +10421,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9783,9 +10442,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9828,8 +10489,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9926,7 +10587,7 @@ def __init__( doc: Optional[Any] = None, name: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10004,13 +10665,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10021,6 +10686,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10054,13 +10721,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10071,6 +10742,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10096,13 +10769,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10113,6 +10790,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10137,13 +10816,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10154,6 +10837,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -10178,13 +10863,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10195,6 +10884,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -10219,13 +10910,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10236,9 +10931,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10277,8 +10974,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10333,7 +11030,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10411,13 +11108,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10428,6 +11129,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10462,13 +11165,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10479,6 +11186,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10504,13 +11213,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10521,6 +11234,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10545,13 +11260,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10562,6 +11281,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -10586,13 +11307,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10603,6 +11328,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -10627,13 +11354,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10644,9 +11375,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10685,8 +11418,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10742,7 +11475,7 @@ def __init__( doc: Optional[Any] = None, name: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10813,13 +11546,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10830,6 +11567,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10864,13 +11603,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10881,6 +11624,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10906,13 +11651,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10923,6 +11672,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10947,13 +11698,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10964,6 +11719,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -10988,13 +11745,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11005,6 +11766,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -11029,13 +11792,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11046,9 +11813,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11087,8 +11856,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11144,7 +11913,7 @@ def __init__( streamable: Optional[Any] = None, format: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11228,13 +11997,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11245,6 +12018,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -11278,13 +12053,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11295,6 +12074,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11320,13 +12101,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11337,6 +12122,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11361,13 +12148,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11378,6 +12169,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -11402,13 +12195,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11419,6 +12216,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -11443,13 +12242,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11460,6 +12263,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -11484,13 +12289,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11501,6 +12310,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -11525,13 +12336,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11542,9 +12357,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11585,8 +12402,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11664,7 +12481,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11731,13 +12548,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11748,6 +12569,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -11781,13 +12604,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11798,6 +12625,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11823,13 +12652,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11840,6 +12673,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11864,13 +12699,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11881,6 +12720,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -11905,13 +12746,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11922,9 +12767,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11962,8 +12809,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12010,7 +12857,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12077,13 +12924,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12094,6 +12945,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -12128,13 +12981,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12145,6 +13002,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -12170,13 +13029,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12187,6 +13050,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -12211,13 +13076,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12228,6 +13097,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12252,13 +13123,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12269,9 +13144,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12309,8 +13186,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12356,7 +13233,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12423,13 +13300,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12440,6 +13321,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -12474,13 +13357,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12491,6 +13378,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -12516,13 +13405,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12533,6 +13426,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -12557,13 +13452,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12574,6 +13473,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12598,13 +13499,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12615,9 +13520,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12655,8 +13562,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12712,7 +13619,7 @@ def __init__( loadListing: Optional[Any] = None, default: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12805,13 +13712,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12822,6 +13733,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -12855,13 +13768,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12872,6 +13789,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -12896,13 +13815,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12913,6 +13836,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -12937,13 +13862,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12954,6 +13883,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12978,13 +13909,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12995,6 +13930,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -13019,13 +13956,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13036,6 +13977,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -13060,13 +14003,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13077,6 +14024,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -13101,13 +14050,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13118,6 +14071,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -13142,13 +14097,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13159,6 +14118,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) try: @@ -13184,13 +14145,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13201,6 +14166,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -13225,13 +14192,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13242,9 +14213,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13288,8 +14261,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -13395,7 +14368,7 @@ def __init__( id: Optional[Any] = None, format: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -13479,13 +14452,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13496,6 +14473,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -13529,13 +14508,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13546,6 +14529,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -13570,13 +14555,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13587,6 +14576,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -13611,13 +14602,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13628,6 +14623,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -13652,13 +14649,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13669,6 +14670,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -13693,13 +14696,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13710,6 +14717,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) try: @@ -13735,13 +14744,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13752,6 +14765,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -13776,13 +14791,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13793,9 +14812,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13836,8 +14857,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -13931,7 +14952,7 @@ def __init__( successCodes: Optional[Any] = None, temporaryFailCodes: Optional[Any] = None, permanentFailCodes: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14048,13 +15069,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14065,6 +15090,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -14098,13 +15125,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14115,6 +15146,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -14139,13 +15172,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14156,6 +15193,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -14181,13 +15220,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14198,6 +15241,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -14223,13 +15268,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14240,6 +15289,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -14264,13 +15315,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14281,6 +15336,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -14305,13 +15362,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14322,6 +15383,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -14346,13 +15409,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14363,6 +15430,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) baseCommand = None @@ -14387,13 +15456,17 @@ def fromDoc( ) ) else: + val = _doc.get("baseCommand") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("baseCommand")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14404,6 +15477,8 @@ def fromDoc( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [e], + detailed_message=f"the `baseCommand` field with value `{val}` " + "is not valid because:", ) ) arguments = None @@ -14428,13 +15503,17 @@ def fromDoc( ) ) else: + val = _doc.get("arguments") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("arguments")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14445,6 +15524,8 @@ def fromDoc( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [e], + detailed_message=f"the `arguments` field with value `{val}` " + "is not valid because:", ) ) stdin = None @@ -14469,13 +15550,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14486,6 +15571,8 @@ def fromDoc( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [e], + detailed_message=f"the `stdin` field with value `{val}` " + "is not valid because:", ) ) stderr = None @@ -14510,13 +15597,17 @@ def fromDoc( ) ) else: + val = _doc.get("stderr") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stderr")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14527,6 +15618,8 @@ def fromDoc( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [e], + detailed_message=f"the `stderr` field with value `{val}` " + "is not valid because:", ) ) stdout = None @@ -14551,13 +15644,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdout") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdout")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14568,6 +15665,8 @@ def fromDoc( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [e], + detailed_message=f"the `stdout` field with value `{val}` " + "is not valid because:", ) ) successCodes = None @@ -14592,13 +15691,17 @@ def fromDoc( ) ) else: + val = _doc.get("successCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("successCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14609,6 +15712,8 @@ def fromDoc( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [e], + detailed_message=f"the `successCodes` field with value `{val}` " + "is not valid because:", ) ) temporaryFailCodes = None @@ -14633,13 +15738,17 @@ def fromDoc( ) ) else: + val = _doc.get("temporaryFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("temporaryFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14650,6 +15759,8 @@ def fromDoc( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [e], + detailed_message=f"the `temporaryFailCodes` field with value `{val}` " + "is not valid because:", ) ) permanentFailCodes = None @@ -14674,13 +15785,17 @@ def fromDoc( ) ) else: + val = _doc.get("permanentFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("permanentFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14691,9 +15806,11 @@ def fromDoc( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [e], + detailed_message=f"the `permanentFailCodes` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14742,8 +15859,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14926,7 +16043,7 @@ def __init__( dockerImport: Optional[Any] = None, dockerImageId: Optional[Any] = None, dockerOutputDirectory: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15013,13 +16130,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerPull") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerPull")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15030,6 +16151,8 @@ def fromDoc( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [e], + detailed_message=f"the `dockerPull` field with value `{val}` " + "is not valid because:", ) ) dockerLoad = None @@ -15054,13 +16177,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerLoad") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerLoad")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15071,6 +16198,8 @@ def fromDoc( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [e], + detailed_message=f"the `dockerLoad` field with value `{val}` " + "is not valid because:", ) ) dockerFile = None @@ -15095,13 +16224,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerFile") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerFile")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15112,6 +16245,8 @@ def fromDoc( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [e], + detailed_message=f"the `dockerFile` field with value `{val}` " + "is not valid because:", ) ) dockerImport = None @@ -15136,13 +16271,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImport") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImport")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15153,6 +16292,8 @@ def fromDoc( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [e], + detailed_message=f"the `dockerImport` field with value `{val}` " + "is not valid because:", ) ) dockerImageId = None @@ -15177,13 +16318,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImageId") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImageId")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15194,6 +16339,8 @@ def fromDoc( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [e], + detailed_message=f"the `dockerImageId` field with value `{val}` " + "is not valid because:", ) ) dockerOutputDirectory = None @@ -15218,13 +16365,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerOutputDirectory") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerOutputDirectory")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15235,9 +16386,11 @@ def fromDoc( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [e], + detailed_message=f"the `dockerOutputDirectory` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15275,8 +16428,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15360,7 +16513,7 @@ class SoftwareRequirement(ProcessRequirement): def __init__( self, packages: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15425,13 +16578,17 @@ def fromDoc( ) ) else: + val = _doc.get("packages") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("packages")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15442,9 +16599,11 @@ def fromDoc( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [e], + detailed_message=f"the `packages` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15477,8 +16636,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15510,7 +16669,7 @@ def __init__( package: Any, version: Optional[Any] = None, specs: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15574,13 +16733,17 @@ def fromDoc( ) ) else: + val = _doc.get("package") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("package")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15591,6 +16754,8 @@ def fromDoc( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [e], + detailed_message=f"the `package` field with value `{val}` " + "is not valid because:", ) ) version = None @@ -15615,13 +16780,17 @@ def fromDoc( ) ) else: + val = _doc.get("version") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("version")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15632,6 +16801,8 @@ def fromDoc( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [e], + detailed_message=f"the `version` field with value `{val}` " + "is not valid because:", ) ) specs = None @@ -15656,13 +16827,17 @@ def fromDoc( ) ) else: + val = _doc.get("specs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("specs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15673,9 +16848,11 @@ def fromDoc( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [e], + detailed_message=f"the `specs` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15710,8 +16887,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15756,7 +16933,7 @@ def __init__( entry: Any, entryname: Optional[Any] = None, writable: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15819,13 +16996,17 @@ def fromDoc( ) ) else: + val = _doc.get("entryname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entryname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15836,6 +17017,8 @@ def fromDoc( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [e], + detailed_message=f"the `entryname` field with value `{val}` " + "is not valid because:", ) ) try: @@ -15861,13 +17044,17 @@ def fromDoc( ) ) else: + val = _doc.get("entry") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entry")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15878,6 +17065,8 @@ def fromDoc( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [e], + detailed_message=f"the `entry` field with value `{val}` " + "is not valid because:", ) ) writable = None @@ -15902,13 +17091,17 @@ def fromDoc( ) ) else: + val = _doc.get("writable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("writable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15919,9 +17112,11 @@ def fromDoc( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [e], + detailed_message=f"the `writable` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15956,8 +17151,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16000,7 +17195,7 @@ class InitialWorkDirRequirement(ProcessRequirement): def __init__( self, listing: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16065,13 +17260,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16082,9 +17281,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16117,8 +17318,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16154,7 +17355,7 @@ class EnvVarRequirement(ProcessRequirement): def __init__( self, envDef: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16219,13 +17420,17 @@ def fromDoc( ) ) else: + val = _doc.get("envDef") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envDef")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16236,9 +17441,11 @@ def fromDoc( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [e], + detailed_message=f"the `envDef` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16271,8 +17478,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16312,7 +17519,7 @@ class ShellCommandRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16353,7 +17560,7 @@ def fromDoc( if _doc.get("class") != "ShellCommandRequirement": raise ValidationException("tried `ShellCommandRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16383,8 +17590,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16441,7 +17648,7 @@ def __init__( tmpdirMax: Optional[Any] = None, outdirMin: Optional[Any] = None, outdirMax: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16534,13 +17741,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16551,6 +17762,8 @@ def fromDoc( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [e], + detailed_message=f"the `coresMin` field with value `{val}` " + "is not valid because:", ) ) coresMax = None @@ -16575,13 +17788,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16592,6 +17809,8 @@ def fromDoc( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [e], + detailed_message=f"the `coresMax` field with value `{val}` " + "is not valid because:", ) ) ramMin = None @@ -16616,13 +17835,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16633,6 +17856,8 @@ def fromDoc( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [e], + detailed_message=f"the `ramMin` field with value `{val}` " + "is not valid because:", ) ) ramMax = None @@ -16657,13 +17882,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16674,6 +17903,8 @@ def fromDoc( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [e], + detailed_message=f"the `ramMax` field with value `{val}` " + "is not valid because:", ) ) tmpdirMin = None @@ -16698,13 +17929,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16715,6 +17950,8 @@ def fromDoc( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [e], + detailed_message=f"the `tmpdirMin` field with value `{val}` " + "is not valid because:", ) ) tmpdirMax = None @@ -16739,13 +17976,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16756,6 +17997,8 @@ def fromDoc( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [e], + detailed_message=f"the `tmpdirMax` field with value `{val}` " + "is not valid because:", ) ) outdirMin = None @@ -16780,13 +18023,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16797,6 +18044,8 @@ def fromDoc( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [e], + detailed_message=f"the `outdirMin` field with value `{val}` " + "is not valid because:", ) ) outdirMax = None @@ -16821,13 +18070,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16838,9 +18091,11 @@ def fromDoc( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [e], + detailed_message=f"the `outdirMax` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16880,8 +18135,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16976,7 +18231,7 @@ class WorkReuse(ProcessRequirement): def __init__( self, enableReuse: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17043,13 +18298,17 @@ def fromDoc( ) ) else: + val = _doc.get("enableReuse") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("enableReuse")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `enableReuse` field is not valid because:", SourceLine(_doc, "enableReuse", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17060,9 +18319,11 @@ def fromDoc( "the `enableReuse` field is not valid because:", SourceLine(_doc, "enableReuse", str), [e], + detailed_message=f"the `enableReuse` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17095,8 +18356,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17148,7 +18409,7 @@ class NetworkAccess(ProcessRequirement): def __init__( self, networkAccess: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17216,13 +18477,17 @@ def fromDoc( ) ) else: + val = _doc.get("networkAccess") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("networkAccess")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `networkAccess` field is not valid because:", SourceLine(_doc, "networkAccess", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17233,9 +18498,11 @@ def fromDoc( "the `networkAccess` field is not valid because:", SourceLine(_doc, "networkAccess", str), [e], + detailed_message=f"the `networkAccess` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17268,8 +18535,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17336,7 +18603,7 @@ class InplaceUpdateRequirement(ProcessRequirement): def __init__( self, inplaceUpdate: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17404,13 +18671,17 @@ def fromDoc( ) ) else: + val = _doc.get("inplaceUpdate") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inplaceUpdate")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inplaceUpdate` field is not valid because:", SourceLine(_doc, "inplaceUpdate", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17421,9 +18692,11 @@ def fromDoc( "the `inplaceUpdate` field is not valid because:", SourceLine(_doc, "inplaceUpdate", str), [e], + detailed_message=f"the `inplaceUpdate` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17456,8 +18729,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17501,7 +18774,7 @@ class ToolTimeLimit(ProcessRequirement): def __init__( self, timelimit: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17568,13 +18841,17 @@ def fromDoc( ) ) else: + val = _doc.get("timelimit") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("timelimit")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `timelimit` field is not valid because:", SourceLine(_doc, "timelimit", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17585,9 +18862,11 @@ def fromDoc( "the `timelimit` field is not valid because:", SourceLine(_doc, "timelimit", str), [e], + detailed_message=f"the `timelimit` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17620,8 +18899,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17660,7 +18939,7 @@ def __init__( doc: Optional[Any] = None, id: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17741,13 +19020,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17758,6 +19041,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -17791,13 +19076,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17808,6 +19097,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -17832,13 +19123,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17849,6 +19144,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -17873,13 +19170,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17890,6 +19191,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -17914,13 +19217,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17931,6 +19238,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -17955,13 +19264,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17972,6 +19285,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) try: @@ -17997,13 +19312,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18014,9 +19333,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -18056,8 +19377,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -18125,7 +19446,7 @@ def __init__( loadListing: Optional[Any] = None, default: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18218,13 +19539,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18235,6 +19560,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -18268,13 +19595,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18285,6 +19616,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -18309,13 +19642,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18326,6 +19663,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -18350,13 +19689,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18367,6 +19710,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -18391,13 +19736,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18408,6 +19757,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -18432,13 +19783,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18449,6 +19804,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -18473,13 +19830,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18490,6 +19851,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -18514,13 +19877,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18531,6 +19898,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -18555,13 +19924,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18572,6 +19945,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18597,13 +19972,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18614,6 +19993,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -18638,13 +20019,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18655,9 +20040,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -18701,8 +20088,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -18816,7 +20203,7 @@ def __init__( requirements: Optional[Any] = None, hints: Optional[Any] = None, cwlVersion: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18912,13 +20299,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18929,6 +20320,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -18962,13 +20355,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18979,6 +20376,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -19003,13 +20402,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19020,6 +20423,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19045,13 +20450,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19062,6 +20471,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19087,13 +20498,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19104,6 +20519,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -19128,13 +20545,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19145,6 +20566,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -19169,13 +20592,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19186,6 +20613,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -19210,13 +20639,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19227,6 +20660,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19252,13 +20687,17 @@ def fromDoc( ) ) else: + val = _doc.get("expression") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expression")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19269,9 +20708,11 @@ def fromDoc( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [e], + detailed_message=f"the `expression` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19313,8 +20754,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19409,7 +20850,7 @@ def __init__( format: Optional[Any] = None, outputSource: Optional[Any] = None, linkMerge: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19496,13 +20937,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19513,6 +20958,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -19546,13 +20993,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19563,6 +21014,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -19587,13 +21040,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19604,6 +21061,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -19628,13 +21087,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19645,6 +21108,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -19669,13 +21134,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19686,6 +21155,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -19710,13 +21181,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19727,6 +21202,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) outputSource = None @@ -19751,13 +21228,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputSource") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputSource")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19768,6 +21249,8 @@ def fromDoc( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [e], + detailed_message=f"the `outputSource` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -19792,13 +21275,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19809,6 +21296,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19834,13 +21323,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19851,9 +21344,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19895,8 +21390,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -20029,7 +21524,7 @@ def __init__( label: Optional[Any] = None, default: Optional[Any] = None, valueFrom: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -20113,13 +21608,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20130,6 +21629,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -20163,13 +21664,17 @@ def fromDoc( ) ) else: + val = _doc.get("source") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("source")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20180,6 +21685,8 @@ def fromDoc( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [e], + detailed_message=f"the `source` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -20204,13 +21711,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20221,6 +21732,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -20245,13 +21758,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20262,6 +21779,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -20286,13 +21805,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20303,6 +21826,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -20327,13 +21852,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20344,6 +21873,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -20368,13 +21899,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20385,6 +21920,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -20409,13 +21946,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20426,9 +21967,11 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -20469,8 +22012,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -20553,7 +22096,7 @@ class WorkflowStepOutput(Identified): def __init__( self, id: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -20610,13 +22153,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20627,6 +22174,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -20638,7 +22187,7 @@ def fromDoc( id = "_:" + str(_uuid__.uuid4()) if not __original_id_is_none: baseuri = cast(str, id) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -20670,8 +22219,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -20766,7 +22315,7 @@ def __init__( hints: Optional[Any] = None, scatter: Optional[Any] = None, scatterMethod: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -20856,13 +22405,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20873,6 +22426,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -20906,13 +22461,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20923,6 +22482,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -20947,13 +22508,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20964,6 +22529,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -20989,13 +22556,17 @@ def fromDoc( ) ) else: + val = _doc.get("in") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("in")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21006,6 +22577,8 @@ def fromDoc( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [e], + detailed_message=f"the `in` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21031,13 +22604,17 @@ def fromDoc( ) ) else: + val = _doc.get("out") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("out")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21048,6 +22625,8 @@ def fromDoc( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [e], + detailed_message=f"the `out` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -21072,13 +22651,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21089,6 +22672,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -21113,13 +22698,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21130,6 +22719,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) @@ -21157,13 +22748,17 @@ def fromDoc( ) ) else: + val = _doc.get("run") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("run")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21174,6 +22769,8 @@ def fromDoc( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [e], + detailed_message=f"the `run` field with value `{val}` " + "is not valid because:", ) ) scatter = None @@ -21198,13 +22795,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatter") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatter")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21215,6 +22816,8 @@ def fromDoc( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [e], + detailed_message=f"the `scatter` field with value `{val}` " + "is not valid because:", ) ) scatterMethod = None @@ -21239,13 +22842,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatterMethod") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatterMethod")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21256,9 +22863,11 @@ def fromDoc( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [e], + detailed_message=f"the `scatterMethod` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -21301,8 +22910,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -21436,7 +23045,7 @@ def __init__( requirements: Optional[Any] = None, hints: Optional[Any] = None, cwlVersion: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -21532,13 +23141,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21549,6 +23162,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -21582,13 +23197,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21599,6 +23218,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -21623,13 +23244,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21640,6 +23265,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21665,13 +23292,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21682,6 +23313,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21707,13 +23340,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21724,6 +23361,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -21748,13 +23387,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21765,6 +23408,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -21789,13 +23434,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21806,6 +23455,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -21830,13 +23481,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21847,6 +23502,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21872,13 +23529,17 @@ def fromDoc( ) ) else: + val = _doc.get("steps") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("steps")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21889,9 +23550,11 @@ def fromDoc( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [e], + detailed_message=f"the `steps` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -21933,8 +23596,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22015,7 +23678,7 @@ class SubworkflowFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22056,7 +23719,7 @@ def fromDoc( if _doc.get("class") != "SubworkflowFeatureRequirement": raise ValidationException("tried `SubworkflowFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22086,8 +23749,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22118,7 +23781,7 @@ class ScatterFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22159,7 +23822,7 @@ def fromDoc( if _doc.get("class") != "ScatterFeatureRequirement": raise ValidationException("tried `ScatterFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22189,8 +23852,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22221,7 +23884,7 @@ class MultipleInputFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22262,7 +23925,7 @@ def fromDoc( if _doc.get("class") != "MultipleInputFeatureRequirement": raise ValidationException("tried `MultipleInputFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22292,8 +23955,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22324,7 +23987,7 @@ class StepInputExpressionRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22365,7 +24028,7 @@ def fromDoc( if _doc.get("class") != "StepInputExpressionRequirement": raise ValidationException("tried `StepInputExpressionRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22395,8 +24058,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: diff --git a/cwl_utils/parser/cwl_v1_2.py b/cwl_utils/parser/cwl_v1_2.py index bc19a7c9..2f3c8abe 100644 --- a/cwl_utils/parser/cwl_v1_2.py +++ b/cwl_utils/parser/cwl_v1_2.py @@ -11,21 +11,10 @@ import uuid as _uuid__ # pylint: disable=unused-import # noqa: F401 import xml.sax # nosec from abc import ABC, abstractmethod +from collections.abc import MutableMapping, MutableSequence, Sequence from io import StringIO from itertools import chain -from typing import ( - Any, - Dict, - List, - MutableMapping, - MutableSequence, - Optional, - Sequence, - Tuple, - Type, - Union, - cast, -) +from typing import Any, Optional, Union, cast from urllib.parse import quote, urldefrag, urlparse, urlsplit, urlunsplit from urllib.request import pathname2url @@ -38,13 +27,13 @@ from schema_salad.sourceline import SourceLine, add_lc_filename from schema_salad.utils import CacheType, yaml_no_ts # requires schema-salad v8.2+ -_vocab: Dict[str, str] = {} -_rvocab: Dict[str, str] = {} +_vocab: dict[str, str] = {} +_rvocab: dict[str, str] = {} _logger = logging.getLogger("salad") -IdxType = MutableMapping[str, Tuple[Any, "LoadingOptions"]] +IdxType = MutableMapping[str, tuple[Any, "LoadingOptions"]] class LoadingOptions: @@ -56,27 +45,27 @@ class LoadingOptions: original_doc: Optional[Any] addl_metadata: MutableMapping[str, Any] fetcher: Fetcher - vocab: Dict[str, str] - rvocab: Dict[str, str] + vocab: dict[str, str] + rvocab: dict[str, str] cache: CacheType - imports: List[str] - includes: List[str] + imports: list[str] + includes: list[str] no_link_check: Optional[bool] container: Optional[str] def __init__( self, fetcher: Optional[Fetcher] = None, - namespaces: Optional[Dict[str, str]] = None, - schemas: Optional[List[str]] = None, + namespaces: Optional[dict[str, str]] = None, + schemas: Optional[list[str]] = None, fileuri: Optional[str] = None, copyfrom: Optional["LoadingOptions"] = None, original_doc: Optional[Any] = None, - addl_metadata: Optional[Dict[str, str]] = None, + addl_metadata: Optional[dict[str, str]] = None, baseuri: Optional[str] = None, idx: Optional[IdxType] = None, - imports: Optional[List[str]] = None, - includes: Optional[List[str]] = None, + imports: Optional[list[str]] = None, + includes: Optional[list[str]] = None, no_link_check: Optional[bool] = None, container: Optional[str] = None, ) -> None: @@ -216,16 +205,16 @@ def fromDoc( @abstractmethod def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: + ) -> dict[str, Any]: """Convert this object to a JSON/YAML friendly dictionary.""" def load_field( - val: Union[str, Dict[str, str]], + val: Union[str, dict[str, str]], fieldtype: "_Loader", baseuri: str, loadingOptions: LoadingOptions, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: """Load field.""" if isinstance(val, MutableMapping): @@ -252,7 +241,7 @@ def load_field( save_type = Optional[Union[MutableMapping[str, Any], MutableSequence[Any], int, float, bool, str]] -def extract_type(val_type: Type[Any]) -> str: +def extract_type(val_type: type[Any]) -> str: """Take a type of value, and extracts the value as a string.""" val_str = str(val_type) return val_str.split("'")[1] @@ -271,7 +260,7 @@ def convert_typing(val_type: str) -> str: return val_type -def parse_errors(error_message: str) -> Tuple[str, str, str]: +def parse_errors(error_message: str) -> tuple[str, str, str]: """Parse error messages from several loaders into one error message.""" if not error_message.startswith("Expected"): return error_message, "", "" @@ -431,7 +420,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: pass @@ -443,7 +432,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc is not None: return doc @@ -451,7 +440,7 @@ def load( class _PrimitiveLoader(_Loader): - def __init__(self, tp: Union[type, Tuple[Type[str], Type[str]]]) -> None: + def __init__(self, tp: Union[type, tuple[type[str], type[str]]]) -> None: self.tp = tp def load( @@ -460,7 +449,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, self.tp): raise ValidationException(f"Expected a {self.tp} but got {doc.__class__.__name__}") @@ -480,16 +469,16 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableSequence): raise ValidationException( f"Value is a {convert_typing(extract_type(type(doc)))}, " f"but valid type for this field is an array." ) - r: List[Any] = [] - errors: List[SchemaSaladException] = [] - fields: List[str] = [] + r: list[Any] = [] + errors: list[SchemaSaladException] = [] + fields: list[str] = [] for i in range(0, len(doc)): try: lf = load_field( @@ -546,7 +535,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException(f"Expected a map, was {type(doc)}") @@ -554,8 +543,8 @@ def load( loadingOptions = LoadingOptions( copyfrom=loadingOptions, container=self.container, no_link_check=self.no_link_check ) - r: Dict[str, Any] = {} - errors: List[SchemaSaladException] = [] + r: dict[str, Any] = {} + errors: list[SchemaSaladException] = [] for k, v in doc.items(): try: lf = load_field(v, self.values, baseuri, loadingOptions, lc) @@ -581,7 +570,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if doc in self.symbols: return doc @@ -601,9 +590,9 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: - r: List[Dict[str, Any]] = [] + r: list[dict[str, Any]] = [] if isinstance(doc, MutableSequence): for d in doc: if isinstance(d, str): @@ -612,7 +601,7 @@ def load( else: r.append({"pattern": d}) elif isinstance(d, dict): - new_dict: Dict[str, Any] = {} + new_dict: dict[str, Any] = {} dict_copy = copy.deepcopy(d) if "pattern" in dict_copy: new_dict["pattern"] = dict_copy.pop("pattern") @@ -666,7 +655,7 @@ def load( class _RecordLoader(_Loader): def __init__( self, - classtype: Type[Saveable], + classtype: type[Saveable], container: Optional[str] = None, no_link_check: Optional[bool] = None, ) -> None: @@ -680,7 +669,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, MutableMapping): raise ValidationException( @@ -698,7 +687,7 @@ def __repr__(self) -> str: class _ExpressionLoader(_Loader): - def __init__(self, items: Type[str]) -> None: + def __init__(self, items: type[str]) -> None: self.items = items def load( @@ -707,7 +696,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if not isinstance(doc, str): raise ValidationException( @@ -731,7 +720,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: errors = [] @@ -763,7 +752,7 @@ def load( if "id" in lc: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, "id", str), [e], ) @@ -771,7 +760,7 @@ def load( else: errors.append( ValidationException( - f"checking object `{id}`", + f"checking object `{id}` using `{t}`", SourceLine(lc, doc.get("id"), str), [e], ) @@ -828,7 +817,7 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if self.no_link_check is not None: loadingOptions = LoadingOptions( @@ -886,7 +875,7 @@ def resolve( doc: str, baseuri: str, loadingOptions: LoadingOptions, - ) -> Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str]: + ) -> Union[list[Union[dict[str, Any], str]], dict[str, Any], str]: doc_ = doc optional = False if doc_.endswith("?"): @@ -895,7 +884,7 @@ def resolve( if doc_.endswith("[]"): salad_versions = [int(v) for v in self.salad_version[1:].split(".")] - items: Union[List[Union[Dict[str, Any], str]], Dict[str, Any], str] = "" + items: Union[list[Union[dict[str, Any], str]], dict[str, Any], str] = "" rest = doc_[0:-2] if salad_versions < [1, 3]: if rest.endswith("[]"): @@ -907,7 +896,7 @@ def resolve( items = self.resolve(rest, baseuri, loadingOptions) if isinstance(items, str): items = expand_url(items, baseuri, loadingOptions, False, True, self.refScope) - expanded: Union[Dict[str, Any], str] = {"type": "array", "items": items} + expanded: Union[dict[str, Any], str] = {"type": "array", "items": items} else: expanded = expand_url(doc_, baseuri, loadingOptions, False, True, self.refScope) @@ -922,10 +911,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableSequence): - r: List[Any] = [] + r: list[Any] = [] for d in doc: if isinstance(d, str): resolved = self.resolve(d, baseuri, loadingOptions) @@ -957,10 +946,10 @@ def load( baseuri: str, loadingOptions: LoadingOptions, docRoot: Optional[str] = None, - lc: Optional[List[Any]] = None, + lc: Optional[list[Any]] = None, ) -> Any: if isinstance(doc, MutableMapping): - r: List[Any] = [] + r: list[Any] = [] for k in sorted(doc.keys()): val = doc[k] if isinstance(val, CommentedMap): @@ -990,7 +979,7 @@ def _document_load( baseuri: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if isinstance(doc, str): return _document_load_by_url( loader, @@ -1059,7 +1048,7 @@ def _document_load_by_url( url: str, loadingOptions: LoadingOptions, addl_metadata_fields: Optional[MutableSequence[str]] = None, -) -> Tuple[Any, LoadingOptions]: +) -> tuple[Any, LoadingOptions]: if url in loadingOptions.idx: return loadingOptions.idx[url] @@ -1101,7 +1090,7 @@ def file_uri(path: str, split_frag: bool = False) -> str: return f"file://{urlpath}{frag}" -def prefix_url(url: str, namespaces: Dict[str, str]) -> str: +def prefix_url(url: str, namespaces: dict[str, str]) -> str: """Expand short forms into full URLs using the given namespace dictionary.""" for k, v in namespaces.items(): if url.startswith(v): @@ -1178,7 +1167,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1241,13 +1230,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1258,6 +1251,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1291,13 +1286,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1308,6 +1307,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1333,13 +1334,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1350,9 +1355,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1388,8 +1395,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1425,7 +1432,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1483,13 +1490,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1500,6 +1511,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1525,13 +1538,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1542,9 +1559,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1578,8 +1597,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1618,7 +1637,7 @@ def __init__( symbols: Any, type_: Any, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1681,13 +1700,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1698,6 +1721,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -1732,13 +1757,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1749,6 +1778,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1774,13 +1805,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1791,9 +1826,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -1829,8 +1866,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -1865,7 +1902,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -1924,13 +1961,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1941,6 +1982,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -1966,13 +2009,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -1983,9 +2030,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2019,8 +2068,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2052,7 +2101,7 @@ def __init__( self, type_: Any, values: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2111,13 +2160,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2128,6 +2181,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2153,13 +2208,17 @@ def fromDoc( ) ) else: + val = _doc.get("values") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("values")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2170,9 +2229,11 @@ def fromDoc( "the `values` field is not valid because:", SourceLine(_doc, "values", str), [e], + detailed_message=f"the `values` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2206,8 +2267,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2239,7 +2300,7 @@ def __init__( self, names: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2298,13 +2359,17 @@ def fromDoc( ) ) else: + val = _doc.get("names") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("names")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2315,6 +2380,8 @@ def fromDoc( "the `names` field is not valid because:", SourceLine(_doc, "names", str), [e], + detailed_message=f"the `names` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2340,13 +2407,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2357,9 +2428,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2393,8 +2466,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2426,7 +2499,7 @@ def __init__( self, items: Any, type_: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2485,13 +2558,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2502,6 +2579,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2527,13 +2606,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2544,9 +2627,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2580,8 +2665,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2614,7 +2699,7 @@ def __init__( name: Any, type_: Any, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2677,13 +2762,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2694,6 +2783,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -2727,13 +2818,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2744,6 +2839,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2769,13 +2866,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2786,9 +2887,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -2824,8 +2927,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -2861,7 +2964,7 @@ def __init__( self, type_: Any, fields: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -2919,13 +3022,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2936,6 +3043,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -2961,13 +3070,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -2978,9 +3091,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3014,8 +3129,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3127,7 +3242,7 @@ def __init__( secondaryFiles: Optional[Any] = None, format: Optional[Any] = None, contents: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3229,13 +3344,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3246,6 +3365,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3270,13 +3391,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3287,6 +3412,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3311,13 +3438,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3328,6 +3459,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) dirname = None @@ -3352,13 +3485,17 @@ def fromDoc( ) ) else: + val = _doc.get("dirname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dirname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3369,6 +3506,8 @@ def fromDoc( "the `dirname` field is not valid because:", SourceLine(_doc, "dirname", str), [e], + detailed_message=f"the `dirname` field with value `{val}` " + "is not valid because:", ) ) nameroot = None @@ -3393,13 +3532,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameroot") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameroot")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3410,6 +3553,8 @@ def fromDoc( "the `nameroot` field is not valid because:", SourceLine(_doc, "nameroot", str), [e], + detailed_message=f"the `nameroot` field with value `{val}` " + "is not valid because:", ) ) nameext = None @@ -3434,13 +3579,17 @@ def fromDoc( ) ) else: + val = _doc.get("nameext") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("nameext")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3451,6 +3600,8 @@ def fromDoc( "the `nameext` field is not valid because:", SourceLine(_doc, "nameext", str), [e], + detailed_message=f"the `nameext` field with value `{val}` " + "is not valid because:", ) ) checksum = None @@ -3475,13 +3626,17 @@ def fromDoc( ) ) else: + val = _doc.get("checksum") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("checksum")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3492,6 +3647,8 @@ def fromDoc( "the `checksum` field is not valid because:", SourceLine(_doc, "checksum", str), [e], + detailed_message=f"the `checksum` field with value `{val}` " + "is not valid because:", ) ) size = None @@ -3516,13 +3673,17 @@ def fromDoc( ) ) else: + val = _doc.get("size") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("size")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3533,6 +3694,8 @@ def fromDoc( "the `size` field is not valid because:", SourceLine(_doc, "size", str), [e], + detailed_message=f"the `size` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -3557,13 +3720,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3574,6 +3741,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -3598,13 +3767,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3615,6 +3788,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) contents = None @@ -3639,13 +3814,17 @@ def fromDoc( ) ) else: + val = _doc.get("contents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("contents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3656,9 +3835,11 @@ def fromDoc( "the `contents` field is not valid because:", SourceLine(_doc, "contents", str), [e], + detailed_message=f"the `contents` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -3701,8 +3882,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -3837,7 +4018,7 @@ def __init__( path: Optional[Any] = None, basename: Optional[Any] = None, listing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -3912,13 +4093,17 @@ def fromDoc( ) ) else: + val = _doc.get("location") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("location")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3929,6 +4114,8 @@ def fromDoc( "the `location` field is not valid because:", SourceLine(_doc, "location", str), [e], + detailed_message=f"the `location` field with value `{val}` " + "is not valid because:", ) ) path = None @@ -3953,13 +4140,17 @@ def fromDoc( ) ) else: + val = _doc.get("path") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("path")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -3970,6 +4161,8 @@ def fromDoc( "the `path` field is not valid because:", SourceLine(_doc, "path", str), [e], + detailed_message=f"the `path` field with value `{val}` " + "is not valid because:", ) ) basename = None @@ -3994,13 +4187,17 @@ def fromDoc( ) ) else: + val = _doc.get("basename") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("basename")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4011,6 +4208,8 @@ def fromDoc( "the `basename` field is not valid because:", SourceLine(_doc, "basename", str), [e], + detailed_message=f"the `basename` field with value `{val}` " + "is not valid because:", ) ) listing = None @@ -4035,13 +4234,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4052,9 +4255,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4090,8 +4295,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4164,7 +4369,7 @@ class InputBinding(Saveable): def __init__( self, loadContents: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4221,13 +4426,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4238,9 +4447,11 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4273,8 +4484,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4325,7 +4536,7 @@ def __init__( format: Optional[Any] = None, loadContents: Optional[Any] = None, loadListing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4412,13 +4623,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4429,6 +4644,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -4462,13 +4679,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4479,6 +4700,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -4504,13 +4727,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4521,6 +4748,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -4545,13 +4774,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4562,6 +4795,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -4586,13 +4821,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4603,6 +4842,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -4627,13 +4868,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4644,6 +4889,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -4668,13 +4915,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4685,6 +4936,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -4709,13 +4962,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4726,6 +4983,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -4750,13 +5009,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4767,9 +5030,11 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -4811,8 +5076,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -4898,7 +5163,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -4965,13 +5230,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -4982,6 +5251,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5015,13 +5286,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5032,6 +5307,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5057,13 +5334,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5074,6 +5355,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5098,13 +5381,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5115,6 +5402,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5139,13 +5428,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5156,9 +5449,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5196,8 +5491,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5244,7 +5539,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5311,13 +5606,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5328,6 +5627,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5362,13 +5663,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5379,6 +5684,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5404,13 +5711,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5421,6 +5732,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5445,13 +5758,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5462,6 +5779,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5486,13 +5805,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5503,9 +5826,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5543,8 +5868,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5590,7 +5915,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -5657,13 +5982,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5674,6 +6003,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -5708,13 +6039,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5725,6 +6060,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -5750,13 +6087,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5767,6 +6108,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -5791,13 +6134,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5808,6 +6155,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -5832,13 +6181,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -5849,9 +6202,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -5889,8 +6244,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -5938,7 +6293,7 @@ def __init__( secondaryFiles: Optional[Any] = None, streamable: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6019,13 +6374,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6036,6 +6395,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6069,13 +6430,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6086,6 +6451,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6111,13 +6478,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6128,6 +6499,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6152,13 +6525,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6169,6 +6546,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -6193,13 +6572,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6210,6 +6593,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -6234,13 +6619,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6251,6 +6640,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -6275,13 +6666,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6292,9 +6687,11 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6334,8 +6731,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6397,7 +6794,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6464,13 +6861,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6481,6 +6882,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6514,13 +6917,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6531,6 +6938,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6556,13 +6965,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6573,6 +6986,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6597,13 +7012,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6614,6 +7033,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -6638,13 +7059,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6655,9 +7080,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -6695,8 +7122,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -6743,7 +7170,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -6810,13 +7237,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6827,6 +7258,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -6861,13 +7294,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6878,6 +7315,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -6903,13 +7342,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6920,6 +7363,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -6944,13 +7389,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -6961,6 +7410,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -6985,13 +7436,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7002,9 +7457,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7042,8 +7499,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7089,7 +7546,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7156,13 +7613,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7173,6 +7634,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -7207,13 +7670,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7224,6 +7691,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -7249,13 +7718,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7266,6 +7739,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -7290,13 +7765,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7307,6 +7786,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -7331,13 +7812,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7348,9 +7833,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7388,8 +7875,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7472,7 +7959,7 @@ class InlineJavascriptRequirement(ProcessRequirement): def __init__( self, expressionLib: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7539,13 +8026,17 @@ def fromDoc( ) ) else: + val = _doc.get("expressionLib") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expressionLib")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7556,9 +8047,11 @@ def fromDoc( "the `expressionLib` field is not valid because:", SourceLine(_doc, "expressionLib", str), [e], + detailed_message=f"the `expressionLib` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7591,8 +8084,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7645,7 +8138,7 @@ class SchemaDefRequirement(ProcessRequirement): def __init__( self, types: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7710,13 +8203,17 @@ def fromDoc( ) ) else: + val = _doc.get("types") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("types")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7727,9 +8224,11 @@ def fromDoc( "the `types` field is not valid because:", SourceLine(_doc, "types", str), [e], + detailed_message=f"the `types` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7762,8 +8261,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -7811,7 +8310,7 @@ def __init__( self, pattern: Any, required: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -7872,13 +8371,17 @@ def fromDoc( ) ) else: + val = _doc.get("pattern") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("pattern")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `pattern` field is not valid because:", SourceLine(_doc, "pattern", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7889,6 +8392,8 @@ def fromDoc( "the `pattern` field is not valid because:", SourceLine(_doc, "pattern", str), [e], + detailed_message=f"the `pattern` field with value `{val}` " + "is not valid because:", ) ) required = None @@ -7913,13 +8418,17 @@ def fromDoc( ) ) else: + val = _doc.get("required") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("required")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `required` field is not valid because:", SourceLine(_doc, "required", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -7930,9 +8439,11 @@ def fromDoc( "the `required` field is not valid because:", SourceLine(_doc, "required", str), [e], + detailed_message=f"the `required` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -7966,8 +8477,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8005,7 +8516,7 @@ class LoadListingRequirement(ProcessRequirement): def __init__( self, loadListing: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8071,13 +8582,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8088,9 +8603,11 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8123,8 +8640,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8165,7 +8682,7 @@ def __init__( self, envName: Any, envValue: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8226,13 +8743,17 @@ def fromDoc( ) ) else: + val = _doc.get("envName") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envName")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8243,6 +8764,8 @@ def fromDoc( "the `envName` field is not valid because:", SourceLine(_doc, "envName", str), [e], + detailed_message=f"the `envName` field with value `{val}` " + "is not valid because:", ) ) try: @@ -8268,13 +8791,17 @@ def fromDoc( ) ) else: + val = _doc.get("envValue") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envValue")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8285,9 +8812,11 @@ def fromDoc( "the `envValue` field is not valid because:", SourceLine(_doc, "envValue", str), [e], + detailed_message=f"the `envValue` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8321,8 +8850,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8399,7 +8928,7 @@ def __init__( itemSeparator: Optional[Any] = None, valueFrom: Optional[Any] = None, shellQuote: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8480,13 +9009,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8497,6 +9030,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) position = None @@ -8521,13 +9056,17 @@ def fromDoc( ) ) else: + val = _doc.get("position") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("position")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8538,6 +9077,8 @@ def fromDoc( "the `position` field is not valid because:", SourceLine(_doc, "position", str), [e], + detailed_message=f"the `position` field with value `{val}` " + "is not valid because:", ) ) prefix = None @@ -8562,13 +9103,17 @@ def fromDoc( ) ) else: + val = _doc.get("prefix") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("prefix")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8579,6 +9124,8 @@ def fromDoc( "the `prefix` field is not valid because:", SourceLine(_doc, "prefix", str), [e], + detailed_message=f"the `prefix` field with value `{val}` " + "is not valid because:", ) ) separate = None @@ -8603,13 +9150,17 @@ def fromDoc( ) ) else: + val = _doc.get("separate") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("separate")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8620,6 +9171,8 @@ def fromDoc( "the `separate` field is not valid because:", SourceLine(_doc, "separate", str), [e], + detailed_message=f"the `separate` field with value `{val}` " + "is not valid because:", ) ) itemSeparator = None @@ -8644,13 +9197,17 @@ def fromDoc( ) ) else: + val = _doc.get("itemSeparator") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("itemSeparator")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8661,6 +9218,8 @@ def fromDoc( "the `itemSeparator` field is not valid because:", SourceLine(_doc, "itemSeparator", str), [e], + detailed_message=f"the `itemSeparator` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -8685,13 +9244,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8702,6 +9265,8 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) shellQuote = None @@ -8726,13 +9291,17 @@ def fromDoc( ) ) else: + val = _doc.get("shellQuote") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("shellQuote")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8743,9 +9312,11 @@ def fromDoc( "the `shellQuote` field is not valid because:", SourceLine(_doc, "shellQuote", str), [e], + detailed_message=f"the `shellQuote` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -8784,8 +9355,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -8876,7 +9447,7 @@ def __init__( loadListing: Optional[Any] = None, glob: Optional[Any] = None, outputEval: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -8941,13 +9512,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8958,6 +9533,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -8982,13 +9559,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -8999,6 +9580,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) glob = None @@ -9023,13 +9606,17 @@ def fromDoc( ) ) else: + val = _doc.get("glob") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("glob")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9040,6 +9627,8 @@ def fromDoc( "the `glob` field is not valid because:", SourceLine(_doc, "glob", str), [e], + detailed_message=f"the `glob` field with value `{val}` " + "is not valid because:", ) ) outputEval = None @@ -9064,13 +9653,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputEval") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputEval")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9081,9 +9674,11 @@ def fromDoc( "the `outputEval` field is not valid because:", SourceLine(_doc, "outputEval", str), [e], + detailed_message=f"the `outputEval` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9119,8 +9714,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9169,7 +9764,7 @@ class CommandLineBindable(Saveable): def __init__( self, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9226,13 +9821,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9243,9 +9842,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9278,8 +9879,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9319,7 +9920,7 @@ def __init__( loadContents: Optional[Any] = None, loadListing: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -9409,13 +10010,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9426,6 +10031,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -9459,13 +10066,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9476,6 +10087,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -9501,13 +10114,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9518,6 +10135,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -9542,13 +10161,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9559,6 +10182,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -9583,13 +10208,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9600,6 +10229,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -9624,13 +10255,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9641,6 +10276,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -9665,13 +10302,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9682,6 +10323,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -9706,13 +10349,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9723,6 +10370,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -9747,13 +10396,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9764,6 +10417,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -9788,13 +10443,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -9805,9 +10464,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -9850,8 +10511,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -9948,7 +10609,7 @@ def __init__( doc: Optional[Any] = None, name: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10026,13 +10687,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10043,6 +10708,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10076,13 +10743,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10093,6 +10764,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10118,13 +10791,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10135,6 +10812,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10159,13 +10838,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10176,6 +10859,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -10200,13 +10885,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10217,6 +10906,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -10241,13 +10932,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10258,9 +10953,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10299,8 +10996,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10355,7 +11052,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10433,13 +11130,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10450,6 +11151,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10484,13 +11187,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10501,6 +11208,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10526,13 +11235,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10543,6 +11256,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10567,13 +11282,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10584,6 +11303,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -10608,13 +11329,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10625,6 +11350,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -10649,13 +11376,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10666,9 +11397,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -10707,8 +11440,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -10764,7 +11497,7 @@ def __init__( doc: Optional[Any] = None, name: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -10835,13 +11568,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10852,6 +11589,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -10886,13 +11625,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10903,6 +11646,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -10928,13 +11673,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10945,6 +11694,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -10969,13 +11720,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -10986,6 +11741,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -11010,13 +11767,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11027,6 +11788,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -11051,13 +11814,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11068,9 +11835,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11109,8 +11878,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11166,7 +11935,7 @@ def __init__( streamable: Optional[Any] = None, format: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11250,13 +12019,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11267,6 +12040,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -11300,13 +12075,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11317,6 +12096,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11342,13 +12123,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11359,6 +12144,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11383,13 +12170,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11400,6 +12191,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -11424,13 +12217,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11441,6 +12238,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -11465,13 +12264,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11482,6 +12285,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -11506,13 +12311,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11523,6 +12332,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -11547,13 +12358,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11564,9 +12379,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11607,8 +12424,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -11686,7 +12503,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -11753,13 +12570,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11770,6 +12591,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -11803,13 +12626,17 @@ def fromDoc( ) ) else: + val = _doc.get("fields") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("fields")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11820,6 +12647,8 @@ def fromDoc( "the `fields` field is not valid because:", SourceLine(_doc, "fields", str), [e], + detailed_message=f"the `fields` field with value `{val}` " + "is not valid because:", ) ) try: @@ -11845,13 +12674,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11862,6 +12695,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -11886,13 +12721,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11903,6 +12742,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -11927,13 +12768,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -11944,9 +12789,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -11984,8 +12831,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12032,7 +12879,7 @@ def __init__( name: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12099,13 +12946,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12116,6 +12967,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -12150,13 +13003,17 @@ def fromDoc( ) ) else: + val = _doc.get("symbols") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("symbols")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12167,6 +13024,8 @@ def fromDoc( "the `symbols` field is not valid because:", SourceLine(_doc, "symbols", str), [e], + detailed_message=f"the `symbols` field with value `{val}` " + "is not valid because:", ) ) try: @@ -12192,13 +13051,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12209,6 +13072,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -12233,13 +13098,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12250,6 +13119,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12274,13 +13145,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12291,9 +13166,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12331,8 +13208,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12378,7 +13255,7 @@ def __init__( label: Optional[Any] = None, doc: Optional[Any] = None, name: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12445,13 +13322,17 @@ def fromDoc( ) ) else: + val = _doc.get("name") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("name")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12462,6 +13343,8 @@ def fromDoc( "the `name` field is not valid because:", SourceLine(_doc, "name", str), [e], + detailed_message=f"the `name` field with value `{val}` " + "is not valid because:", ) ) @@ -12496,13 +13379,17 @@ def fromDoc( ) ) else: + val = _doc.get("items") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("items")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12513,6 +13400,8 @@ def fromDoc( "the `items` field is not valid because:", SourceLine(_doc, "items", str), [e], + detailed_message=f"the `items` field with value `{val}` " + "is not valid because:", ) ) try: @@ -12538,13 +13427,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12555,6 +13448,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -12579,13 +13474,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12596,6 +13495,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -12620,13 +13521,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12637,9 +13542,11 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -12677,8 +13584,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -12734,7 +13641,7 @@ def __init__( loadListing: Optional[Any] = None, default: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -12827,13 +13734,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12844,6 +13755,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -12877,13 +13790,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12894,6 +13811,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -12918,13 +13837,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12935,6 +13858,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -12959,13 +13884,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -12976,6 +13905,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -13000,13 +13931,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13017,6 +13952,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -13041,13 +13978,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13058,6 +13999,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -13082,13 +14025,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13099,6 +14046,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -13123,13 +14072,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13140,6 +14093,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -13164,13 +14119,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13181,6 +14140,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) try: @@ -13206,13 +14167,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13223,6 +14188,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -13247,13 +14214,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13264,9 +14235,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13310,8 +14283,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -13417,7 +14390,7 @@ def __init__( id: Optional[Any] = None, format: Optional[Any] = None, outputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -13501,13 +14474,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13518,6 +14495,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -13551,13 +14530,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13568,6 +14551,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -13592,13 +14577,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13609,6 +14598,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -13633,13 +14624,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13650,6 +14645,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -13674,13 +14671,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13691,6 +14692,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -13715,13 +14718,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13732,6 +14739,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) try: @@ -13757,13 +14766,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13774,6 +14787,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) outputBinding = None @@ -13798,13 +14813,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -13815,9 +14834,11 @@ def fromDoc( "the `outputBinding` field is not valid because:", SourceLine(_doc, "outputBinding", str), [e], + detailed_message=f"the `outputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -13858,8 +14879,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -13954,7 +14975,7 @@ def __init__( successCodes: Optional[Any] = None, temporaryFailCodes: Optional[Any] = None, permanentFailCodes: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -14074,13 +15095,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14091,6 +15116,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -14124,13 +15151,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14141,6 +15172,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -14165,13 +15198,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14182,6 +15219,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -14207,13 +15246,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14224,6 +15267,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -14249,13 +15294,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14266,6 +15315,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -14290,13 +15341,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14307,6 +15362,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -14331,13 +15388,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14348,6 +15409,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -14372,13 +15435,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14389,6 +15456,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) intent = None @@ -14413,13 +15482,17 @@ def fromDoc( ) ) else: + val = _doc.get("intent") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("intent")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14430,6 +15503,8 @@ def fromDoc( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [e], + detailed_message=f"the `intent` field with value `{val}` " + "is not valid because:", ) ) baseCommand = None @@ -14454,13 +15529,17 @@ def fromDoc( ) ) else: + val = _doc.get("baseCommand") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("baseCommand")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14471,6 +15550,8 @@ def fromDoc( "the `baseCommand` field is not valid because:", SourceLine(_doc, "baseCommand", str), [e], + detailed_message=f"the `baseCommand` field with value `{val}` " + "is not valid because:", ) ) arguments = None @@ -14495,13 +15576,17 @@ def fromDoc( ) ) else: + val = _doc.get("arguments") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("arguments")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14512,6 +15597,8 @@ def fromDoc( "the `arguments` field is not valid because:", SourceLine(_doc, "arguments", str), [e], + detailed_message=f"the `arguments` field with value `{val}` " + "is not valid because:", ) ) stdin = None @@ -14536,13 +15623,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14553,6 +15644,8 @@ def fromDoc( "the `stdin` field is not valid because:", SourceLine(_doc, "stdin", str), [e], + detailed_message=f"the `stdin` field with value `{val}` " + "is not valid because:", ) ) stderr = None @@ -14577,13 +15670,17 @@ def fromDoc( ) ) else: + val = _doc.get("stderr") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stderr")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14594,6 +15691,8 @@ def fromDoc( "the `stderr` field is not valid because:", SourceLine(_doc, "stderr", str), [e], + detailed_message=f"the `stderr` field with value `{val}` " + "is not valid because:", ) ) stdout = None @@ -14618,13 +15717,17 @@ def fromDoc( ) ) else: + val = _doc.get("stdout") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("stdout")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14635,6 +15738,8 @@ def fromDoc( "the `stdout` field is not valid because:", SourceLine(_doc, "stdout", str), [e], + detailed_message=f"the `stdout` field with value `{val}` " + "is not valid because:", ) ) successCodes = None @@ -14659,13 +15764,17 @@ def fromDoc( ) ) else: + val = _doc.get("successCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("successCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14676,6 +15785,8 @@ def fromDoc( "the `successCodes` field is not valid because:", SourceLine(_doc, "successCodes", str), [e], + detailed_message=f"the `successCodes` field with value `{val}` " + "is not valid because:", ) ) temporaryFailCodes = None @@ -14700,13 +15811,17 @@ def fromDoc( ) ) else: + val = _doc.get("temporaryFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("temporaryFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14717,6 +15832,8 @@ def fromDoc( "the `temporaryFailCodes` field is not valid because:", SourceLine(_doc, "temporaryFailCodes", str), [e], + detailed_message=f"the `temporaryFailCodes` field with value `{val}` " + "is not valid because:", ) ) permanentFailCodes = None @@ -14741,13 +15858,17 @@ def fromDoc( ) ) else: + val = _doc.get("permanentFailCodes") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("permanentFailCodes")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -14758,9 +15879,11 @@ def fromDoc( "the `permanentFailCodes` field is not valid because:", SourceLine(_doc, "permanentFailCodes", str), [e], + detailed_message=f"the `permanentFailCodes` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -14810,8 +15933,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -14998,7 +16121,7 @@ def __init__( dockerImport: Optional[Any] = None, dockerImageId: Optional[Any] = None, dockerOutputDirectory: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15085,13 +16208,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerPull") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerPull")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15102,6 +16229,8 @@ def fromDoc( "the `dockerPull` field is not valid because:", SourceLine(_doc, "dockerPull", str), [e], + detailed_message=f"the `dockerPull` field with value `{val}` " + "is not valid because:", ) ) dockerLoad = None @@ -15126,13 +16255,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerLoad") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerLoad")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15143,6 +16276,8 @@ def fromDoc( "the `dockerLoad` field is not valid because:", SourceLine(_doc, "dockerLoad", str), [e], + detailed_message=f"the `dockerLoad` field with value `{val}` " + "is not valid because:", ) ) dockerFile = None @@ -15167,13 +16302,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerFile") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerFile")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15184,6 +16323,8 @@ def fromDoc( "the `dockerFile` field is not valid because:", SourceLine(_doc, "dockerFile", str), [e], + detailed_message=f"the `dockerFile` field with value `{val}` " + "is not valid because:", ) ) dockerImport = None @@ -15208,13 +16349,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImport") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImport")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15225,6 +16370,8 @@ def fromDoc( "the `dockerImport` field is not valid because:", SourceLine(_doc, "dockerImport", str), [e], + detailed_message=f"the `dockerImport` field with value `{val}` " + "is not valid because:", ) ) dockerImageId = None @@ -15249,13 +16396,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerImageId") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerImageId")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15266,6 +16417,8 @@ def fromDoc( "the `dockerImageId` field is not valid because:", SourceLine(_doc, "dockerImageId", str), [e], + detailed_message=f"the `dockerImageId` field with value `{val}` " + "is not valid because:", ) ) dockerOutputDirectory = None @@ -15290,13 +16443,17 @@ def fromDoc( ) ) else: + val = _doc.get("dockerOutputDirectory") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("dockerOutputDirectory")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15307,9 +16464,11 @@ def fromDoc( "the `dockerOutputDirectory` field is not valid because:", SourceLine(_doc, "dockerOutputDirectory", str), [e], + detailed_message=f"the `dockerOutputDirectory` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15347,8 +16506,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15432,7 +16591,7 @@ class SoftwareRequirement(ProcessRequirement): def __init__( self, packages: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15497,13 +16656,17 @@ def fromDoc( ) ) else: + val = _doc.get("packages") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("packages")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15514,9 +16677,11 @@ def fromDoc( "the `packages` field is not valid because:", SourceLine(_doc, "packages", str), [e], + detailed_message=f"the `packages` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15549,8 +16714,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15582,7 +16747,7 @@ def __init__( package: Any, version: Optional[Any] = None, specs: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15646,13 +16811,17 @@ def fromDoc( ) ) else: + val = _doc.get("package") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("package")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15663,6 +16832,8 @@ def fromDoc( "the `package` field is not valid because:", SourceLine(_doc, "package", str), [e], + detailed_message=f"the `package` field with value `{val}` " + "is not valid because:", ) ) version = None @@ -15687,13 +16858,17 @@ def fromDoc( ) ) else: + val = _doc.get("version") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("version")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15704,6 +16879,8 @@ def fromDoc( "the `version` field is not valid because:", SourceLine(_doc, "version", str), [e], + detailed_message=f"the `version` field with value `{val}` " + "is not valid because:", ) ) specs = None @@ -15728,13 +16905,17 @@ def fromDoc( ) ) else: + val = _doc.get("specs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("specs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15745,9 +16926,11 @@ def fromDoc( "the `specs` field is not valid because:", SourceLine(_doc, "specs", str), [e], + detailed_message=f"the `specs` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -15782,8 +16965,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -15832,7 +17015,7 @@ def __init__( entry: Any, entryname: Optional[Any] = None, writable: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -15895,13 +17078,17 @@ def fromDoc( ) ) else: + val = _doc.get("entryname") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entryname")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15912,6 +17099,8 @@ def fromDoc( "the `entryname` field is not valid because:", SourceLine(_doc, "entryname", str), [e], + detailed_message=f"the `entryname` field with value `{val}` " + "is not valid because:", ) ) try: @@ -15937,13 +17126,17 @@ def fromDoc( ) ) else: + val = _doc.get("entry") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("entry")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15954,6 +17147,8 @@ def fromDoc( "the `entry` field is not valid because:", SourceLine(_doc, "entry", str), [e], + detailed_message=f"the `entry` field with value `{val}` " + "is not valid because:", ) ) writable = None @@ -15978,13 +17173,17 @@ def fromDoc( ) ) else: + val = _doc.get("writable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("writable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -15995,9 +17194,11 @@ def fromDoc( "the `writable` field is not valid because:", SourceLine(_doc, "writable", str), [e], + detailed_message=f"the `writable` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16032,8 +17233,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16077,7 +17278,7 @@ class InitialWorkDirRequirement(ProcessRequirement): def __init__( self, listing: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16142,13 +17343,17 @@ def fromDoc( ) ) else: + val = _doc.get("listing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("listing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16159,9 +17364,11 @@ def fromDoc( "the `listing` field is not valid because:", SourceLine(_doc, "listing", str), [e], + detailed_message=f"the `listing` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16194,8 +17401,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16231,7 +17438,7 @@ class EnvVarRequirement(ProcessRequirement): def __init__( self, envDef: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16296,13 +17503,17 @@ def fromDoc( ) ) else: + val = _doc.get("envDef") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("envDef")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16313,9 +17524,11 @@ def fromDoc( "the `envDef` field is not valid because:", SourceLine(_doc, "envDef", str), [e], + detailed_message=f"the `envDef` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16348,8 +17561,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16389,7 +17602,7 @@ class ShellCommandRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16430,7 +17643,7 @@ def fromDoc( if _doc.get("class") != "ShellCommandRequirement": raise ValidationException("tried `ShellCommandRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16460,8 +17673,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -16523,7 +17736,7 @@ def __init__( tmpdirMax: Optional[Any] = None, outdirMin: Optional[Any] = None, outdirMax: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -16616,13 +17829,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16633,6 +17850,8 @@ def fromDoc( "the `coresMin` field is not valid because:", SourceLine(_doc, "coresMin", str), [e], + detailed_message=f"the `coresMin` field with value `{val}` " + "is not valid because:", ) ) coresMax = None @@ -16657,13 +17876,17 @@ def fromDoc( ) ) else: + val = _doc.get("coresMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("coresMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16674,6 +17897,8 @@ def fromDoc( "the `coresMax` field is not valid because:", SourceLine(_doc, "coresMax", str), [e], + detailed_message=f"the `coresMax` field with value `{val}` " + "is not valid because:", ) ) ramMin = None @@ -16698,13 +17923,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16715,6 +17944,8 @@ def fromDoc( "the `ramMin` field is not valid because:", SourceLine(_doc, "ramMin", str), [e], + detailed_message=f"the `ramMin` field with value `{val}` " + "is not valid because:", ) ) ramMax = None @@ -16739,13 +17970,17 @@ def fromDoc( ) ) else: + val = _doc.get("ramMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("ramMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16756,6 +17991,8 @@ def fromDoc( "the `ramMax` field is not valid because:", SourceLine(_doc, "ramMax", str), [e], + detailed_message=f"the `ramMax` field with value `{val}` " + "is not valid because:", ) ) tmpdirMin = None @@ -16780,13 +18017,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16797,6 +18038,8 @@ def fromDoc( "the `tmpdirMin` field is not valid because:", SourceLine(_doc, "tmpdirMin", str), [e], + detailed_message=f"the `tmpdirMin` field with value `{val}` " + "is not valid because:", ) ) tmpdirMax = None @@ -16821,13 +18064,17 @@ def fromDoc( ) ) else: + val = _doc.get("tmpdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("tmpdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16838,6 +18085,8 @@ def fromDoc( "the `tmpdirMax` field is not valid because:", SourceLine(_doc, "tmpdirMax", str), [e], + detailed_message=f"the `tmpdirMax` field with value `{val}` " + "is not valid because:", ) ) outdirMin = None @@ -16862,13 +18111,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMin") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMin")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16879,6 +18132,8 @@ def fromDoc( "the `outdirMin` field is not valid because:", SourceLine(_doc, "outdirMin", str), [e], + detailed_message=f"the `outdirMin` field with value `{val}` " + "is not valid because:", ) ) outdirMax = None @@ -16903,13 +18158,17 @@ def fromDoc( ) ) else: + val = _doc.get("outdirMax") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outdirMax")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -16920,9 +18179,11 @@ def fromDoc( "the `outdirMax` field is not valid because:", SourceLine(_doc, "outdirMax", str), [e], + detailed_message=f"the `outdirMax` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -16962,8 +18223,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17058,7 +18319,7 @@ class WorkReuse(ProcessRequirement): def __init__( self, enableReuse: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17125,13 +18386,17 @@ def fromDoc( ) ) else: + val = _doc.get("enableReuse") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("enableReuse")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `enableReuse` field is not valid because:", SourceLine(_doc, "enableReuse", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17142,9 +18407,11 @@ def fromDoc( "the `enableReuse` field is not valid because:", SourceLine(_doc, "enableReuse", str), [e], + detailed_message=f"the `enableReuse` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17177,8 +18444,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17230,7 +18497,7 @@ class NetworkAccess(ProcessRequirement): def __init__( self, networkAccess: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17298,13 +18565,17 @@ def fromDoc( ) ) else: + val = _doc.get("networkAccess") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("networkAccess")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `networkAccess` field is not valid because:", SourceLine(_doc, "networkAccess", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17315,9 +18586,11 @@ def fromDoc( "the `networkAccess` field is not valid because:", SourceLine(_doc, "networkAccess", str), [e], + detailed_message=f"the `networkAccess` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17350,8 +18623,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17418,7 +18691,7 @@ class InplaceUpdateRequirement(ProcessRequirement): def __init__( self, inplaceUpdate: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17486,13 +18759,17 @@ def fromDoc( ) ) else: + val = _doc.get("inplaceUpdate") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inplaceUpdate")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inplaceUpdate` field is not valid because:", SourceLine(_doc, "inplaceUpdate", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17503,9 +18780,11 @@ def fromDoc( "the `inplaceUpdate` field is not valid because:", SourceLine(_doc, "inplaceUpdate", str), [e], + detailed_message=f"the `inplaceUpdate` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17538,8 +18817,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17583,7 +18862,7 @@ class ToolTimeLimit(ProcessRequirement): def __init__( self, timelimit: Any, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17650,13 +18929,17 @@ def fromDoc( ) ) else: + val = _doc.get("timelimit") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("timelimit")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `timelimit` field is not valid because:", SourceLine(_doc, "timelimit", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17667,9 +18950,11 @@ def fromDoc( "the `timelimit` field is not valid because:", SourceLine(_doc, "timelimit", str), [e], + detailed_message=f"the `timelimit` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -17702,8 +18987,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -17742,7 +19027,7 @@ def __init__( doc: Optional[Any] = None, id: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -17823,13 +19108,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17840,6 +19129,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -17873,13 +19164,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17890,6 +19185,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -17914,13 +19211,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17931,6 +19232,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -17955,13 +19258,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -17972,6 +19279,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -17996,13 +19305,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18013,6 +19326,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -18037,13 +19352,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18054,6 +19373,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18079,13 +19400,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18096,9 +19421,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -18138,8 +19465,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -18207,7 +19534,7 @@ def __init__( loadListing: Optional[Any] = None, default: Optional[Any] = None, inputBinding: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18300,13 +19627,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18317,6 +19648,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -18350,13 +19683,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18367,6 +19704,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -18391,13 +19730,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18408,6 +19751,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -18432,13 +19777,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18449,6 +19798,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -18473,13 +19824,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18490,6 +19845,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -18514,13 +19871,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18531,6 +19892,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -18555,13 +19918,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18572,6 +19939,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -18596,13 +19965,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18613,6 +19986,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -18637,13 +20012,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18654,6 +20033,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) try: @@ -18679,13 +20060,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18696,6 +20081,8 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) inputBinding = None @@ -18720,13 +20107,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputBinding") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputBinding")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -18737,9 +20128,11 @@ def fromDoc( "the `inputBinding` field is not valid because:", SourceLine(_doc, "inputBinding", str), [e], + detailed_message=f"the `inputBinding` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -18783,8 +20176,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -18899,7 +20292,7 @@ def __init__( hints: Optional[Any] = None, cwlVersion: Optional[Any] = None, intent: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -18998,13 +20391,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19015,6 +20412,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -19048,13 +20447,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19065,6 +20468,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -19089,13 +20494,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19106,6 +20515,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19131,13 +20542,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19148,6 +20563,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19173,13 +20590,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19190,6 +20611,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -19214,13 +20637,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19231,6 +20658,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -19255,13 +20684,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19272,6 +20705,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -19296,13 +20731,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19313,6 +20752,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) intent = None @@ -19337,13 +20778,17 @@ def fromDoc( ) ) else: + val = _doc.get("intent") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("intent")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19354,6 +20799,8 @@ def fromDoc( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [e], + detailed_message=f"the `intent` field with value `{val}` " + "is not valid because:", ) ) try: @@ -19379,13 +20826,17 @@ def fromDoc( ) ) else: + val = _doc.get("expression") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("expression")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19396,9 +20847,11 @@ def fromDoc( "the `expression` field is not valid because:", SourceLine(_doc, "expression", str), [e], + detailed_message=f"the `expression` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -19441,8 +20894,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -19545,7 +20998,7 @@ def __init__( outputSource: Optional[Any] = None, linkMerge: Optional[Any] = None, pickValue: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -19635,13 +21088,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19652,6 +21109,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -19685,13 +21144,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19702,6 +21165,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -19726,13 +21191,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19743,6 +21212,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -19767,13 +21238,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19784,6 +21259,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -19808,13 +21285,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19825,6 +21306,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -19849,13 +21332,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19866,6 +21353,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) outputSource = None @@ -19890,13 +21379,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputSource") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputSource")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19907,6 +21400,8 @@ def fromDoc( "the `outputSource` field is not valid because:", SourceLine(_doc, "outputSource", str), [e], + detailed_message=f"the `outputSource` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -19931,13 +21426,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19948,6 +21447,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) pickValue = None @@ -19972,13 +21473,17 @@ def fromDoc( ) ) else: + val = _doc.get("pickValue") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("pickValue")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `pickValue` field is not valid because:", SourceLine(_doc, "pickValue", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -19989,6 +21494,8 @@ def fromDoc( "the `pickValue` field is not valid because:", SourceLine(_doc, "pickValue", str), [e], + detailed_message=f"the `pickValue` field with value `{val}` " + "is not valid because:", ) ) try: @@ -20014,13 +21521,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20031,9 +21542,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -20076,8 +21589,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -20281,7 +21794,7 @@ def __init__( label: Optional[Any] = None, default: Optional[Any] = None, valueFrom: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -20368,13 +21881,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20385,6 +21902,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -20418,13 +21937,17 @@ def fromDoc( ) ) else: + val = _doc.get("source") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("source")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20435,6 +21958,8 @@ def fromDoc( "the `source` field is not valid because:", SourceLine(_doc, "source", str), [e], + detailed_message=f"the `source` field with value `{val}` " + "is not valid because:", ) ) linkMerge = None @@ -20459,13 +21984,17 @@ def fromDoc( ) ) else: + val = _doc.get("linkMerge") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("linkMerge")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20476,6 +22005,8 @@ def fromDoc( "the `linkMerge` field is not valid because:", SourceLine(_doc, "linkMerge", str), [e], + detailed_message=f"the `linkMerge` field with value `{val}` " + "is not valid because:", ) ) pickValue = None @@ -20500,13 +22031,17 @@ def fromDoc( ) ) else: + val = _doc.get("pickValue") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("pickValue")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `pickValue` field is not valid because:", SourceLine(_doc, "pickValue", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20517,6 +22052,8 @@ def fromDoc( "the `pickValue` field is not valid because:", SourceLine(_doc, "pickValue", str), [e], + detailed_message=f"the `pickValue` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -20541,13 +22078,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20558,6 +22099,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -20582,13 +22125,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20599,6 +22146,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) label = None @@ -20623,13 +22172,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20640,6 +22193,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -20664,13 +22219,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20681,6 +22240,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) valueFrom = None @@ -20705,13 +22266,17 @@ def fromDoc( ) ) else: + val = _doc.get("valueFrom") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("valueFrom")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20722,9 +22287,11 @@ def fromDoc( "the `valueFrom` field is not valid because:", SourceLine(_doc, "valueFrom", str), [e], + detailed_message=f"the `valueFrom` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -20766,8 +22333,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -20855,7 +22422,7 @@ class WorkflowStepOutput(Identified): def __init__( self, id: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -20912,13 +22479,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -20929,6 +22500,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -20940,7 +22513,7 @@ def fromDoc( id = "_:" + str(_uuid__.uuid4()) if not __original_id_is_none: baseuri = cast(str, id) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -20972,8 +22545,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -21093,7 +22666,7 @@ def __init__( when: Optional[Any] = None, scatter: Optional[Any] = None, scatterMethod: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -21186,13 +22759,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21203,6 +22780,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -21236,13 +22815,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21253,6 +22836,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -21277,13 +22862,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21294,6 +22883,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21319,13 +22910,17 @@ def fromDoc( ) ) else: + val = _doc.get("in") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("in")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21336,6 +22931,8 @@ def fromDoc( "the `in` field is not valid because:", SourceLine(_doc, "in", str), [e], + detailed_message=f"the `in` field with value `{val}` " + "is not valid because:", ) ) try: @@ -21361,13 +22958,17 @@ def fromDoc( ) ) else: + val = _doc.get("out") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("out")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21378,6 +22979,8 @@ def fromDoc( "the `out` field is not valid because:", SourceLine(_doc, "out", str), [e], + detailed_message=f"the `out` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -21402,13 +23005,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21419,6 +23026,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -21443,13 +23052,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21460,6 +23073,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) @@ -21487,13 +23102,17 @@ def fromDoc( ) ) else: + val = _doc.get("run") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("run")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21504,6 +23123,8 @@ def fromDoc( "the `run` field is not valid because:", SourceLine(_doc, "run", str), [e], + detailed_message=f"the `run` field with value `{val}` " + "is not valid because:", ) ) when = None @@ -21528,13 +23149,17 @@ def fromDoc( ) ) else: + val = _doc.get("when") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("when")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `when` field is not valid because:", SourceLine(_doc, "when", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21545,6 +23170,8 @@ def fromDoc( "the `when` field is not valid because:", SourceLine(_doc, "when", str), [e], + detailed_message=f"the `when` field with value `{val}` " + "is not valid because:", ) ) scatter = None @@ -21569,13 +23196,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatter") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatter")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21586,6 +23217,8 @@ def fromDoc( "the `scatter` field is not valid because:", SourceLine(_doc, "scatter", str), [e], + detailed_message=f"the `scatter` field with value `{val}` " + "is not valid because:", ) ) scatterMethod = None @@ -21610,13 +23243,17 @@ def fromDoc( ) ) else: + val = _doc.get("scatterMethod") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("scatterMethod")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21627,9 +23264,11 @@ def fromDoc( "the `scatterMethod` field is not valid because:", SourceLine(_doc, "scatterMethod", str), [e], + detailed_message=f"the `scatterMethod` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -21673,8 +23312,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -21820,7 +23459,7 @@ def __init__( hints: Optional[Any] = None, cwlVersion: Optional[Any] = None, intent: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -21919,13 +23558,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21936,6 +23579,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -21969,13 +23614,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -21986,6 +23635,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -22010,13 +23661,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22027,6 +23682,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -22052,13 +23709,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22069,6 +23730,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -22094,13 +23757,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22111,6 +23778,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -22135,13 +23804,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22152,6 +23825,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -22176,13 +23851,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22193,6 +23872,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -22217,13 +23898,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22234,6 +23919,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) intent = None @@ -22258,13 +23945,17 @@ def fromDoc( ) ) else: + val = _doc.get("intent") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("intent")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22275,6 +23966,8 @@ def fromDoc( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [e], + detailed_message=f"the `intent` field with value `{val}` " + "is not valid because:", ) ) try: @@ -22300,13 +23993,17 @@ def fromDoc( ) ) else: + val = _doc.get("steps") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("steps")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22317,9 +24014,11 @@ def fromDoc( "the `steps` field is not valid because:", SourceLine(_doc, "steps", str), [e], + detailed_message=f"the `steps` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22362,8 +24061,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22448,7 +24147,7 @@ class SubworkflowFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22489,7 +24188,7 @@ def fromDoc( if _doc.get("class") != "SubworkflowFeatureRequirement": raise ValidationException("tried `SubworkflowFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22519,8 +24218,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22551,7 +24250,7 @@ class ScatterFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22592,7 +24291,7 @@ def fromDoc( if _doc.get("class") != "ScatterFeatureRequirement": raise ValidationException("tried `ScatterFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22622,8 +24321,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22654,7 +24353,7 @@ class MultipleInputFeatureRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22695,7 +24394,7 @@ def fromDoc( if _doc.get("class") != "MultipleInputFeatureRequirement": raise ValidationException("tried `MultipleInputFeatureRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22725,8 +24424,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22757,7 +24456,7 @@ class StepInputExpressionRequirement(ProcessRequirement): def __init__( self, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22798,7 +24497,7 @@ def fromDoc( if _doc.get("class") != "StepInputExpressionRequirement": raise ValidationException("tried `StepInputExpressionRequirement` but") - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -22828,8 +24527,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -22869,7 +24568,7 @@ def __init__( loadContents: Optional[Any] = None, loadListing: Optional[Any] = None, default: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -22959,13 +24658,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -22976,6 +24679,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -23009,13 +24714,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23026,6 +24735,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -23050,13 +24761,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23067,6 +24782,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -23091,13 +24808,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23108,6 +24829,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -23132,13 +24855,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23149,6 +24876,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -23173,13 +24902,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23190,6 +24923,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) loadContents = None @@ -23214,13 +24949,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadContents") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadContents")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23231,6 +24970,8 @@ def fromDoc( "the `loadContents` field is not valid because:", SourceLine(_doc, "loadContents", str), [e], + detailed_message=f"the `loadContents` field with value `{val}` " + "is not valid because:", ) ) loadListing = None @@ -23255,13 +24996,17 @@ def fromDoc( ) ) else: + val = _doc.get("loadListing") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("loadListing")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23272,6 +25017,8 @@ def fromDoc( "the `loadListing` field is not valid because:", SourceLine(_doc, "loadListing", str), [e], + detailed_message=f"the `loadListing` field with value `{val}` " + "is not valid because:", ) ) default = None @@ -23296,13 +25043,17 @@ def fromDoc( ) ) else: + val = _doc.get("default") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("default")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23313,6 +25064,8 @@ def fromDoc( "the `default` field is not valid because:", SourceLine(_doc, "default", str), [e], + detailed_message=f"the `default` field with value `{val}` " + "is not valid because:", ) ) try: @@ -23338,13 +25091,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23355,9 +25112,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -23400,8 +25159,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -23499,7 +25258,7 @@ def __init__( doc: Optional[Any] = None, id: Optional[Any] = None, format: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -23580,13 +25339,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23597,6 +25360,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -23630,13 +25395,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23647,6 +25416,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) secondaryFiles = None @@ -23671,13 +25442,17 @@ def fromDoc( ) ) else: + val = _doc.get("secondaryFiles") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("secondaryFiles")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23688,6 +25463,8 @@ def fromDoc( "the `secondaryFiles` field is not valid because:", SourceLine(_doc, "secondaryFiles", str), [e], + detailed_message=f"the `secondaryFiles` field with value `{val}` " + "is not valid because:", ) ) streamable = None @@ -23712,13 +25489,17 @@ def fromDoc( ) ) else: + val = _doc.get("streamable") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("streamable")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23729,6 +25510,8 @@ def fromDoc( "the `streamable` field is not valid because:", SourceLine(_doc, "streamable", str), [e], + detailed_message=f"the `streamable` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -23753,13 +25536,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23770,6 +25557,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) format = None @@ -23794,13 +25583,17 @@ def fromDoc( ) ) else: + val = _doc.get("format") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("format")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23811,6 +25604,8 @@ def fromDoc( "the `format` field is not valid because:", SourceLine(_doc, "format", str), [e], + detailed_message=f"the `format` field with value `{val}` " + "is not valid because:", ) ) try: @@ -23836,13 +25631,17 @@ def fromDoc( ) ) else: + val = _doc.get("type") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("type")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -23853,9 +25652,11 @@ def fromDoc( "the `type` field is not valid because:", SourceLine(_doc, "type", str), [e], + detailed_message=f"the `type` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -23895,8 +25696,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: @@ -23973,7 +25774,7 @@ def __init__( hints: Optional[Any] = None, cwlVersion: Optional[Any] = None, intent: Optional[Any] = None, - extension_fields: Optional[Dict[str, Any]] = None, + extension_fields: Optional[dict[str, Any]] = None, loadingOptions: Optional[LoadingOptions] = None, ) -> None: if extension_fields: @@ -24069,13 +25870,17 @@ def fromDoc( ) ) else: + val = _doc.get("id") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("id")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24086,6 +25891,8 @@ def fromDoc( "the `id` field is not valid because:", SourceLine(_doc, "id", str), [e], + detailed_message=f"the `id` field with value `{val}` " + "is not valid because:", ) ) @@ -24119,13 +25926,17 @@ def fromDoc( ) ) else: + val = _doc.get("label") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("label")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24136,6 +25947,8 @@ def fromDoc( "the `label` field is not valid because:", SourceLine(_doc, "label", str), [e], + detailed_message=f"the `label` field with value `{val}` " + "is not valid because:", ) ) doc = None @@ -24160,13 +25973,17 @@ def fromDoc( ) ) else: + val = _doc.get("doc") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("doc")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24177,6 +25994,8 @@ def fromDoc( "the `doc` field is not valid because:", SourceLine(_doc, "doc", str), [e], + detailed_message=f"the `doc` field with value `{val}` " + "is not valid because:", ) ) try: @@ -24202,13 +26021,17 @@ def fromDoc( ) ) else: + val = _doc.get("inputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("inputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24219,6 +26042,8 @@ def fromDoc( "the `inputs` field is not valid because:", SourceLine(_doc, "inputs", str), [e], + detailed_message=f"the `inputs` field with value `{val}` " + "is not valid because:", ) ) try: @@ -24244,13 +26069,17 @@ def fromDoc( ) ) else: + val = _doc.get("outputs") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("outputs")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24261,6 +26090,8 @@ def fromDoc( "the `outputs` field is not valid because:", SourceLine(_doc, "outputs", str), [e], + detailed_message=f"the `outputs` field with value `{val}` " + "is not valid because:", ) ) requirements = None @@ -24285,13 +26116,17 @@ def fromDoc( ) ) else: + val = _doc.get("requirements") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("requirements")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24302,6 +26137,8 @@ def fromDoc( "the `requirements` field is not valid because:", SourceLine(_doc, "requirements", str), [e], + detailed_message=f"the `requirements` field with value `{val}` " + "is not valid because:", ) ) hints = None @@ -24326,13 +26163,17 @@ def fromDoc( ) ) else: + val = _doc.get("hints") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("hints")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24343,6 +26184,8 @@ def fromDoc( "the `hints` field is not valid because:", SourceLine(_doc, "hints", str), [e], + detailed_message=f"the `hints` field with value `{val}` " + "is not valid because:", ) ) cwlVersion = None @@ -24367,13 +26210,17 @@ def fromDoc( ) ) else: + val = _doc.get("cwlVersion") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("cwlVersion")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24384,6 +26231,8 @@ def fromDoc( "the `cwlVersion` field is not valid because:", SourceLine(_doc, "cwlVersion", str), [e], + detailed_message=f"the `cwlVersion` field with value `{val}` " + "is not valid because:", ) ) intent = None @@ -24408,13 +26257,17 @@ def fromDoc( ) ) else: + val = _doc.get("intent") if error_message != str(e): - val_type = convert_typing(extract_type(type(_doc.get("intent")))) + val_type = convert_typing(extract_type(type(val))) _errors__.append( ValidationException( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [ValidationException(f"Value is a {val_type}, " + f"but valid {to_print} for this field " + f"{verb_tensage} {error_message}", + detailed_message=f"Value `{val}` is a {val_type}, " f"but valid {to_print} for this field " f"{verb_tensage} {error_message}")], ) @@ -24425,9 +26278,11 @@ def fromDoc( "the `intent` field is not valid because:", SourceLine(_doc, "intent", str), [e], + detailed_message=f"the `intent` field with value `{val}` " + "is not valid because:", ) ) - extension_fields: Dict[str, Any] = {} + extension_fields: dict[str, Any] = {} for k in _doc.keys(): if k not in cls.attrs: if not k: @@ -24469,8 +26324,8 @@ def fromDoc( def save( self, top: bool = False, base_url: str = "", relative_uris: bool = True - ) -> Dict[str, Any]: - r: Dict[str, Any] = {} + ) -> dict[str, Any]: + r: dict[str, Any] = {} if relative_uris: for ef in self.extension_fields: diff --git a/requirements.txt b/requirements.txt index 9b1fc759..5e887f69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ cwl-upgrader >= 1.2.3 packaging rdflib requests -schema-salad >= 8.5, < 9 +schema-salad >= 8.8, < 9 ruamel.yaml >= 0.17.6, < 0.19