From e28357ae624e4ecdb27a2b24e8f436842afee265 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Wed, 9 Oct 2024 00:59:11 -0700 Subject: [PATCH 1/9] python 3.13 update --- .github/workflows/main.yaml | 8 +- .github/workflows/pypi-publish.yaml | 2 +- .github/workflows/test-upstream.yaml | 6 +- linkml_runtime/__init__.py | 4 + .../dumpers/delimited_file_dumper.py | 1 - linkml_runtime/dumpers/json_dumper.py | 4 +- linkml_runtime/dumpers/rdflib_dumper.py | 9 +- linkml_runtime/index/object_index.py | 11 +- linkml_runtime/linkml_model/__init__.py | 46 + linkml_runtime/linkml_model/annotations.py | 28 +- linkml_runtime/linkml_model/datasets.py | 42 +- linkml_runtime/linkml_model/extensions.py | 27 +- linkml_runtime/linkml_model/linkml_files.py | 4 +- linkml_runtime/linkml_model/mappings.py | 23 +- linkml_runtime/linkml_model/meta.py | 1122 ++++++++--------- linkml_runtime/linkml_model/types.py | 12 +- linkml_runtime/linkml_model/units.py | 19 +- linkml_runtime/linkml_model/validation.py | 25 +- linkml_runtime/loaders/context_flattener.py | 8 +- .../loaders/delimited_file_loader.py | 14 +- linkml_runtime/loaders/json_loader.py | 8 +- linkml_runtime/loaders/loader_root.py | 22 +- linkml_runtime/loaders/rdf_loader.py | 6 +- linkml_runtime/loaders/rdflib_loader.py | 34 +- linkml_runtime/loaders/yaml_loader.py | 10 +- .../processing/referencevalidator.py | 23 +- .../processing/validation_datamodel.py | 78 +- linkml_runtime/utils/context_utils.py | 10 +- linkml_runtime/utils/csvutils.py | 5 +- linkml_runtime/utils/dictutils.py | 3 +- linkml_runtime/utils/distroutils.py | 5 +- linkml_runtime/utils/enumerations.py | 4 +- linkml_runtime/utils/eval_utils.py | 4 +- linkml_runtime/utils/formatutils.py | 7 +- linkml_runtime/utils/inference_utils.py | 4 +- linkml_runtime/utils/introspection.py | 5 +- linkml_runtime/utils/metamodelcore.py | 4 +- linkml_runtime/utils/namespaces.py | 6 +- linkml_runtime/utils/pattern.py | 7 +- linkml_runtime/utils/permissiblevalueimpl.py | 18 +- linkml_runtime/utils/ruleutils.py | 14 +- linkml_runtime/utils/schema_as_dict.py | 4 +- linkml_runtime/utils/schema_builder.py | 20 +- linkml_runtime/utils/schemaops.py | 7 +- linkml_runtime/utils/schemaview.py | 9 +- linkml_runtime/utils/schemaview_cli.py | 7 +- linkml_runtime/utils/slot.py | 9 +- linkml_runtime/utils/walker_utils.py | 4 +- linkml_runtime/utils/yamlutils.py | 31 +- notebooks/SchemaView_BioLink.ipynb | 86 +- notebooks/SchemaView_Monarch.ipynb | 53 +- poetry.lock | 934 +++++++------- pyproject.toml | 10 +- tests/support/clicktestcase.py | 4 +- tests/support/dirutils.py | 2 +- tests/support/mismatchlog.py | 5 +- tests/support/test_environment.py | 10 +- tests/test_index/model/container_test.py | 109 +- tests/test_index/test_object_index.py | 2 +- tests/test_issues/input/issue_355.py | 25 +- tests/test_issues/input/issue_368.py | 14 +- tests/test_issues/input/issue_368_imports.py | 18 +- tests/test_issues/models/linkml_issue_576.py | 52 +- tests/test_issues/models/model_817.py | 40 +- tests/test_issues/test_issue_1040.py | 1 - tests/test_issues/test_issue_355.py | 24 +- tests/test_issues/test_issue_718a.py | 1 - tests/test_issues/test_issue_8.py | 3 +- tests/test_issues/test_linkml_issue_1126.py | 1 - tests/test_issues/test_linkml_issue_1143.py | 16 +- tests/test_issues/test_linkml_issue_478.py | 1 - tests/test_issues/test_linkml_issue_576.py | 3 +- tests/test_issues/test_linkml_issue_817.py | 1 - tests/test_linkml_model/test_linkml_files.py | 7 +- .../loaderdumpertestcase.py | 6 +- .../models/books_normalized.py | 66 +- .../models/books_normalized_pydantic.py | 64 +- .../test_loaders_dumpers/models/enum_model.py | 17 +- .../models/kitchen_sink_pydantic.py | 196 ++- .../models/node_object.py | 32 +- .../test_loaders_dumpers/models/personinfo.py | 142 +-- .../models/personinfo_test_issue_429.py | 27 +- .../models/phenopackets.py | 454 ++++--- .../models/termci_schema.py | 37 +- .../test_csv_tsv_loader_dumper.py | 6 +- .../test_dumpers_pydantic.py | 6 +- tests/test_loaders_dumpers/test_enum.py | 3 +- tests/test_loaders_dumpers/test_loaders.py | 6 +- .../test_loaders_dumpers.py | 5 +- .../test_loaders_pydantic.py | 2 +- .../test_rdflib_dumper.py | 1 - .../test_referencevalidator.py | 8 +- tests/test_utils/input/inlined_as_dict.py | 23 +- tests/test_utils/input/inlined_as_list.py | 23 +- tests/test_utils/model/inference_example.py | 49 +- tests/test_utils/test_dict_utils.py | 1 - tests/test_utils/test_distroutils.py | 3 - tests/test_utils/test_eval_utils.py | 7 +- tests/test_utils/test_formatutils.py | 4 +- tests/test_utils/test_introspection.py | 2 - tests/test_utils/test_ruleutils.py | 2 - tests/test_utils/test_schema_as_dict.py | 3 +- tests/test_utils/test_schemaview.py | 4 +- 103 files changed, 2138 insertions(+), 2266 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 973acf9c..74c86602 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,10 +12,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.12"] + python-version: ["3.9", "3.10", "3.12", "3.13"] exclude: - os: windows-latest - python-version: "3.8" + python-version: "3.10" + - os: windows-latest + python-version: "3.12" runs-on: ${{ matrix.os }} @@ -34,7 +36,7 @@ jobs: uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'poetry' diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml index a47376cb..03c00bf2 100644 --- a/.github/workflows/pypi-publish.yaml +++ b/.github/workflows/pypi-publish.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2.2.2 with: - python-version: 3.8 + python-version: 3.12 - name: Install Poetry run: pipx install poetry diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index eb07758c..dff2097c 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -10,14 +10,14 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest ] - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] exclude: - - os: windows-latest - python-version: "3.9" - os: windows-latest python-version: "3.10" - os: windows-latest python-version: "3.11" + - os: windows-latest + python-version: "3.12" runs-on: ${{ matrix.os }} env: POETRY_VIRTUALENVS_IN_PROJECT: true diff --git a/linkml_runtime/__init__.py b/linkml_runtime/__init__.py index 6cc39aa1..3062326e 100644 --- a/linkml_runtime/__init__.py +++ b/linkml_runtime/__init__.py @@ -3,6 +3,10 @@ from linkml_runtime.utils.schemaview import SchemaView from rdflib import RDF, RDFS, SKOS, XSD, OWL +__all__ = [ + "SchemaView", +] + # use importlib.metadata to read the version provided # by the package during installation. Do not hardcode # the version in the code diff --git a/linkml_runtime/dumpers/delimited_file_dumper.py b/linkml_runtime/dumpers/delimited_file_dumper.py index b144eaa8..d9e53574 100644 --- a/linkml_runtime/dumpers/delimited_file_dumper.py +++ b/linkml_runtime/dumpers/delimited_file_dumper.py @@ -1,5 +1,4 @@ import io -import yaml import json from abc import ABC, abstractmethod from typing import Union diff --git a/linkml_runtime/dumpers/json_dumper.py b/linkml_runtime/dumpers/json_dumper.py index 45837f05..6b34305f 100644 --- a/linkml_runtime/dumpers/json_dumper.py +++ b/linkml_runtime/dumpers/json_dumper.py @@ -1,6 +1,6 @@ import json from decimal import Decimal -from typing import Dict, Union +from typing import Union from pydantic import BaseModel from deprecated.classic import deprecated @@ -67,7 +67,7 @@ def default(o): @staticmethod @deprecated("Use `utils/formatutils/remove_empty_items` instead") - def remove_empty_items(obj: Dict) -> Dict: + def remove_empty_items(obj: dict) -> dict: """ Remove empty items from obj :param obj: diff --git a/linkml_runtime/dumpers/rdflib_dumper.py b/linkml_runtime/dumpers/rdflib_dumper.py index 4a3d1864..9d61c282 100644 --- a/linkml_runtime/dumpers/rdflib_dumper.py +++ b/linkml_runtime/dumpers/rdflib_dumper.py @@ -1,7 +1,6 @@ import logging import urllib -from abc import abstractmethod -from typing import Optional, Any, Dict, Union +from typing import Optional, Any, Union from pydantic import BaseModel from curies import Converter @@ -31,7 +30,7 @@ def as_rdf_graph( self, element: Union[BaseModel, YAMLRoot], schemaview: SchemaView, - prefix_map: Union[Dict[str, str], Converter, None] = None, + prefix_map: Union[dict[str, str], Converter, None] = None, ) -> Graph: """ Dumps from element to an rdflib Graph, @@ -154,7 +153,7 @@ def dump( to_file: str, schemaview: SchemaView = None, fmt: str = 'turtle', - prefix_map: Union[Dict[str, str], Converter, None] = None, + prefix_map: Union[dict[str, str], Converter, None] = None, **args, ) -> None: """ @@ -174,7 +173,7 @@ def dumps( element: Union[BaseModel, YAMLRoot], schemaview: SchemaView = None, fmt: Optional[str] = 'turtle', - prefix_map: Union[Dict[str, str], Converter, None] = None, + prefix_map: Union[dict[str, str], Converter, None] = None, ) -> str: """ Convert element into an RDF graph guided by the schema diff --git a/linkml_runtime/index/object_index.py b/linkml_runtime/index/object_index.py index 56c7cbe3..a473a1c2 100644 --- a/linkml_runtime/index/object_index.py +++ b/linkml_runtime/index/object_index.py @@ -10,7 +10,8 @@ """ import logging import inspect -from typing import Mapping, Any, Optional, Tuple, List, Iterator, Union +from typing import Any, Union +from collections.abc import Mapping, Iterator from linkml_runtime import SchemaView from linkml_runtime.utils import eval_utils @@ -54,8 +55,8 @@ def __init__(self, obj: YAMLRoot, schemaview: SchemaView): self._schemaview = schemaview self._class_map = schemaview.class_name_mappings() self._source_object_cache: Mapping[str, Any] = {} - self._proxy_object_cache: Mapping[str, "ProxyObject"] = {} - self._child_to_parent: Mapping[str, List[Tuple[str, str]]] = {} + self._proxy_object_cache: Mapping[str, ProxyObject] = {} + self._child_to_parent: Mapping[str, list[tuple[str, str]]] = {} self._index(obj) def _index(self, obj: Any, parent_key=None, parent=None): @@ -112,7 +113,7 @@ def bless(self, obj: Any) -> "ProxyObject": else: return ProxyObject(obj, _db=self) - def _key(self, obj: Any) -> Tuple[Union[str, YAMLRoot], str]: + def _key(self, obj: Any) -> tuple[Union[str, YAMLRoot], str]: """ Returns primary key value for this object. @@ -265,6 +266,6 @@ def _map(self, obj: Any, in_range: str) -> Any: return cls(obj) return obj - def _attributes(self) -> List[str]: + def _attributes(self) -> list[str]: return list(vars(self._shadowed).keys()) diff --git a/linkml_runtime/linkml_model/__init__.py b/linkml_runtime/linkml_model/__init__.py index 3c86968a..587788d0 100644 --- a/linkml_runtime/linkml_model/__init__.py +++ b/linkml_runtime/linkml_model/__init__.py @@ -8,3 +8,49 @@ Definition, EnumDefinition, SlotDefinition, ClassDefinition, Prefix, LocalName, Example, AltDescription, \ PermissibleValue, PvFormulaOptions +__all__ = [ + "String", + "Integer", + "Boolean", + "Float", + "Double", + "Decimal", + "Time", + "Date", + "Datetime", + "Uriorcurie", + "Uri", + "Ncname", + "Objectidentifier", + "Nodeidentifier", + "Extension", + "Extensible", + "Annotation", + "Annotatable", + "ElementName", + "SchemaDefinitionName", + "TypeDefinitionName", + "SubsetDefinitionName", + "DefinitionName", + "EnumDefinitionName", + "SlotDefinitionName", + "ClassDefinitionName", + "PrefixPrefixPrefix", + "LocalNameLocalNameSource", + "AltDescriptionSource", + "PermissibleValueText", + "Element", + "SchemaDefinition", + "TypeDefinition", + "SubsetDefinition", + "Definition", + "EnumDefinition", + "SlotDefinition", + "ClassDefinition", + "Prefix", + "LocalName", + "Example", + "AltDescription", + "PermissibleValue", + "PvFormulaOptions", +] diff --git a/linkml_runtime/linkml_model/annotations.py b/linkml_runtime/linkml_model/annotations.py index 9b229b22..3055634e 100644 --- a/linkml_runtime/linkml_model/annotations.py +++ b/linkml_runtime/linkml_model/annotations.py @@ -7,22 +7,16 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from .extensions import AnyValue, Extension, ExtensionTag -from .types import Uriorcurie -from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" version = "2.0.0" @@ -47,16 +41,16 @@ class Annotatable(YAMLRoot): """ mixin for classes that support annotations """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Annotatable"] class_class_curie: ClassVar[str] = "linkml:Annotatable" class_name: ClassVar[str] = "annotatable" class_model_uri: ClassVar[URIRef] = LINKML.Annotatable - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], list[Union[dict, "Annotation"]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="annotations", slot_type=Annotation, key_name="tag", keyed=True) super().__post_init__(**kwargs) @@ -67,7 +61,7 @@ class Annotation(Extension): """ a tag/value pair with the semantics of OWL Annotation """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Annotation"] class_class_curie: ClassVar[str] = "linkml:Annotation" @@ -76,9 +70,9 @@ class Annotation(Extension): tag: Union[str, AnnotationTag] = None value: Union[dict, AnyValue] = None - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], list[Union[dict, "Annotation"]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.tag): self.MissingRequiredField("tag") if not isinstance(self.tag, AnnotationTag): @@ -97,4 +91,4 @@ class slots: pass slots.annotations = Slot(uri=LINKML.annotations, name="annotations", curie=LINKML.curie('annotations'), - model_uri=LINKML.annotations, domain=None, range=Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], List[Union[dict, "Annotation"]]]]) + model_uri=LINKML.annotations, domain=None, range=Optional[Union[dict[Union[str, AnnotationTag], Union[dict, "Annotation"]], list[Union[dict, "Annotation"]]]]) diff --git a/linkml_runtime/linkml_model/datasets.py b/linkml_runtime/linkml_model/datasets.py index e8bb1521..02c7f3cc 100644 --- a/linkml_runtime/linkml_model/datasets.py +++ b/linkml_runtime/linkml_model/datasets.py @@ -7,20 +7,16 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from .types import Datetime, Integer, String, Uri, Uriorcurie from linkml_runtime.utils.metamodelcore import URI, URIorCURIE, XSDDateTime metamodel_version = "1.7.0" @@ -73,7 +69,7 @@ class Information(YAMLRoot): """ Grouping for datasets and data files """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = DATASETS["Information"] class_class_curie: ClassVar[str] = "datasets:Information" @@ -91,16 +87,16 @@ class Information(YAMLRoot): version: Optional[str] = None language: Optional[str] = None publisher: Optional[Union[str, URIorCURIE]] = None - keywords: Optional[Union[str, List[str]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() issued: Optional[Union[str, XSDDateTime]] = None created_by: Optional[Union[str, URIorCURIE]] = None created_on: Optional[Union[str, XSDDateTime]] = None compression: Optional[str] = None was_derived_from: Optional[str] = None page: Optional[str] = None - test_roles: Optional[Union[Union[str, "TestRole"], List[Union[str, "TestRole"]]]] = empty_list() + test_roles: Optional[Union[Union[str, "TestRole"], list[Union[str, "TestRole"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, InformationId): @@ -170,7 +166,7 @@ class DataPackage(Information): """ A collection of data resources """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VOID["Dataset"] class_class_curie: ClassVar[str] = "void:Dataset" @@ -178,9 +174,9 @@ class DataPackage(Information): class_model_uri: ClassVar[URIRef] = DATASETS.DataPackage id: Union[str, DataPackageId] = None - resources: Optional[Union[Union[str, DataResourceId], List[Union[str, DataResourceId]]]] = empty_list() + resources: Optional[Union[Union[str, DataResourceId], list[Union[str, DataResourceId]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, DataPackageId): @@ -198,7 +194,7 @@ class DataResource(Information): """ An individual file or table """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = DCAT["Distribution"] class_class_curie: ClassVar[str] = "dcat:Distribution" @@ -218,7 +214,7 @@ class DataResource(Information): sha256: Optional[str] = None dialect: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, DataResourceId): @@ -265,7 +261,7 @@ class FormatDialect(YAMLRoot): """ Additional format information for a file """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = DATASETS["FormatDialect"] class_class_curie: ClassVar[str] = "datasets:FormatDialect" @@ -278,7 +274,7 @@ class FormatDialect(YAMLRoot): header: Optional[str] = None quote_char: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.comment_prefix is not None and not isinstance(self.comment_prefix, str): self.comment_prefix = str(self.comment_prefix) @@ -493,16 +489,16 @@ class slots: model_uri=DATASETS.profile, domain=None, range=Optional[Union[str, URIorCURIE]]) slots.keywords = Slot(uri=DCAT.keyword, name="keywords", curie=DCAT.curie('keyword'), - model_uri=DATASETS.keywords, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=DATASETS.keywords, domain=None, range=Optional[Union[str, list[str]]]) slots.themes = Slot(uri=DCAT.theme, name="themes", curie=DCAT.curie('theme'), - model_uri=DATASETS.themes, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=DATASETS.themes, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.resources = Slot(uri=DCAT.distribution, name="resources", curie=DCAT.curie('distribution'), - model_uri=DATASETS.resources, domain=None, range=Optional[Union[Union[str, DataResourceId], List[Union[str, DataResourceId]]]]) + model_uri=DATASETS.resources, domain=None, range=Optional[Union[Union[str, DataResourceId], list[Union[str, DataResourceId]]]]) slots.test_roles = Slot(uri=DATASETS.test_roles, name="test_roles", curie=DATASETS.curie('test_roles'), - model_uri=DATASETS.test_roles, domain=None, range=Optional[Union[Union[str, "TestRole"], List[Union[str, "TestRole"]]]]) + model_uri=DATASETS.test_roles, domain=None, range=Optional[Union[Union[str, "TestRole"], list[Union[str, "TestRole"]]]]) slots.created_by = Slot(uri=PAV.createdBy, name="created_by", curie=PAV.curie('createdBy'), model_uri=DATASETS.created_by, domain=None, range=Optional[Union[str, URIorCURIE]]) diff --git a/linkml_runtime/linkml_model/extensions.py b/linkml_runtime/linkml_model/extensions.py index 3fe8b661..05e1fbc5 100644 --- a/linkml_runtime/linkml_model/extensions.py +++ b/linkml_runtime/linkml_model/extensions.py @@ -7,20 +7,15 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from .types import Uriorcurie from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" @@ -48,7 +43,7 @@ class Extension(YAMLRoot): """ a tag/value pair used to add non-model information to an entry """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Extension"] class_class_curie: ClassVar[str] = "linkml:Extension" @@ -57,9 +52,9 @@ class Extension(YAMLRoot): tag: Union[str, ExtensionTag] = None value: Union[dict, AnyValue] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, "Extension"]], List[Union[dict, "Extension"]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, "Extension"]], list[Union[dict, "Extension"]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.tag): self.MissingRequiredField("tag") if not isinstance(self.tag, ExtensionTag): @@ -75,16 +70,16 @@ class Extensible(YAMLRoot): """ mixin for classes that support extension """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Extensible"] class_class_curie: ClassVar[str] = "linkml:Extensible" class_name: ClassVar[str] = "extensible" class_model_uri: ClassVar[URIRef] = LINKML.Extensible - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="extensions", slot_type=Extension, key_name="tag", keyed=True) super().__post_init__(**kwargs) @@ -98,7 +93,7 @@ class slots: pass slots.extensions = Slot(uri=LINKML.extensions, name="extensions", curie=LINKML.curie('extensions'), - model_uri=LINKML.extensions, domain=None, range=Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]]) + model_uri=LINKML.extensions, domain=None, range=Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]]) slots.extension_tag = Slot(uri=LINKML.tag, name="extension_tag", curie=LINKML.curie('tag'), model_uri=LINKML.extension_tag, domain=Extension, range=Union[str, ExtensionTag]) diff --git a/linkml_runtime/linkml_model/linkml_files.py b/linkml_runtime/linkml_model/linkml_files.py index bce1ca5b..a2a58c08 100644 --- a/linkml_runtime/linkml_model/linkml_files.py +++ b/linkml_runtime/linkml_model/linkml_files.py @@ -1,6 +1,6 @@ from pathlib import Path from enum import Enum, auto -from typing import Dict, Optional, Union, Tuple, NamedTuple +from typing import Optional, Union, NamedTuple from urllib.parse import urljoin from dataclasses import dataclass @@ -87,7 +87,7 @@ class _Path: YAML = FormatPath(str(Path("model") / "schema"),"yaml" ) @classmethod - def items(cls) -> Dict[str, FormatPath]: + def items(cls) -> dict[str, FormatPath]: return {k:v for k,v in cls.__dict__.items() if not k.startswith('_')} @classmethod diff --git a/linkml_runtime/linkml_model/mappings.py b/linkml_runtime/linkml_model/mappings.py index d6135152..e2232494 100644 --- a/linkml_runtime/linkml_model/mappings.py +++ b/linkml_runtime/linkml_model/mappings.py @@ -7,20 +7,11 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any -from dataclasses import dataclass +from typing import Optional, Union from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from .types import Uriorcurie from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" @@ -55,22 +46,22 @@ class slots: pass slots.mappings = Slot(uri=SKOS.mappingRelation, name="mappings", curie=SKOS.curie('mappingRelation'), - model_uri=LINKML.mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.exact_mappings = Slot(uri=SKOS.exactMatch, name="exact mappings", curie=SKOS.curie('exactMatch'), - model_uri=LINKML.exact_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.exact_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.close_mappings = Slot(uri=SKOS.closeMatch, name="close mappings", curie=SKOS.curie('closeMatch'), - model_uri=LINKML.close_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.close_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.related_mappings = Slot(uri=SKOS.relatedMatch, name="related mappings", curie=SKOS.curie('relatedMatch'), - model_uri=LINKML.related_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.related_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.narrow_mappings = Slot(uri=SKOS.narrowMatch, name="narrow mappings", curie=SKOS.curie('narrowMatch'), - model_uri=LINKML.narrow_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.narrow_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.broad_mappings = Slot(uri=SKOS.broadMatch, name="broad mappings", curie=SKOS.curie('broadMatch'), - model_uri=LINKML.broad_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.broad_mappings, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.deprecated_element_has_exact_replacement = Slot(uri=LINKML.deprecated_element_has_exact_replacement, name="deprecated element has exact replacement", curie=LINKML.curie('deprecated_element_has_exact_replacement'), model_uri=LINKML.deprecated_element_has_exact_replacement, domain=None, range=Optional[Union[str, URIorCURIE]], mappings = [IAO["0100001"]]) diff --git a/linkml_runtime/linkml_model/meta.py b/linkml_runtime/linkml_model/meta.py index fee7f676..4bbfa3dd 100644 --- a/linkml_runtime/linkml_model/meta.py +++ b/linkml_runtime/linkml_model/meta.py @@ -31,22 +31,20 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx +from linkml_runtime.utils.formatutils import sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from .annotations import Annotation, AnnotationTag from .extensions import Extension, ExtensionTag -from .types import Boolean, Datetime, Integer, Ncname, String, Uri, Uriorcurie from .units import UnitOfMeasure from linkml_runtime.utils.metamodelcore import Bool, NCName, URI, URIorCURIE, XSDDateTime @@ -153,7 +151,7 @@ class CommonMetadata(YAMLRoot): """ Generic metadata shared across definitions """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["CommonMetadata"] class_class_curie: ClassVar[str] = "linkml:CommonMetadata" @@ -161,40 +159,40 @@ class CommonMetadata(YAMLRoot): class_model_uri: ClassVar[URIRef] = LINKML.CommonMetadata description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], List[Union[dict, "StructuredAlias"]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], list[Union[dict, "StructuredAlias"]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.description is not None and not isinstance(self.description, str): self.description = str(self.description) @@ -316,7 +314,7 @@ class Element(YAMLRoot): """ A named element in the model """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Element"] class_class_curie: ClassVar[str] = "linkml:Element" @@ -324,50 +322,50 @@ class Element(YAMLRoot): class_model_uri: ClassVar[URIRef] = LINKML.Element name: Union[str, ElementName] = None - id_prefixes: Optional[Union[Union[str, NCName], List[Union[str, NCName]]]] = empty_list() + id_prefixes: Optional[Union[Union[str, NCName], list[Union[str, NCName]]]] = empty_list() id_prefixes_are_closed: Optional[Union[bool, Bool]] = None definition_uri: Optional[Union[str, URIorCURIE]] = None - local_names: Optional[Union[Dict[Union[str, LocalNameLocalNameSource], Union[dict, "LocalName"]], List[Union[dict, "LocalName"]]]] = empty_dict() + local_names: Optional[Union[dict[Union[str, LocalNameLocalNameSource], Union[dict, "LocalName"]], list[Union[dict, "LocalName"]]]] = empty_dict() conforms_to: Optional[str] = None - implements: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - instantiates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + implements: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + instantiates: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], List[Union[dict, "StructuredAlias"]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], list[Union[dict, "StructuredAlias"]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, ElementName): @@ -521,7 +519,7 @@ class SchemaDefinition(Element): """ A collection of definitions that make up a schema or a data model. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["SchemaDefinition"] class_class_curie: ClassVar[str] = "linkml:SchemaDefinition" @@ -531,28 +529,28 @@ class SchemaDefinition(Element): name: Union[str, SchemaDefinitionName] = None id: Union[str, URI] = None version: Optional[str] = None - imports: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + imports: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() license: Optional[str] = None - prefixes: Optional[Union[Dict[Union[str, PrefixPrefixPrefix], Union[dict, "Prefix"]], List[Union[dict, "Prefix"]]]] = empty_dict() - emit_prefixes: Optional[Union[Union[str, NCName], List[Union[str, NCName]]]] = empty_list() - default_curi_maps: Optional[Union[str, List[str]]] = empty_list() + prefixes: Optional[Union[dict[Union[str, PrefixPrefixPrefix], Union[dict, "Prefix"]], list[Union[dict, "Prefix"]]]] = empty_dict() + emit_prefixes: Optional[Union[Union[str, NCName], list[Union[str, NCName]]]] = empty_list() + default_curi_maps: Optional[Union[str, list[str]]] = empty_list() default_prefix: Optional[str] = None default_range: Optional[Union[str, TypeDefinitionName]] = None - subsets: Optional[Union[Dict[Union[str, SubsetDefinitionName], Union[dict, "SubsetDefinition"]], List[Union[dict, "SubsetDefinition"]]]] = empty_dict() - types: Optional[Union[Dict[Union[str, TypeDefinitionName], Union[dict, "TypeDefinition"]], List[Union[dict, "TypeDefinition"]]]] = empty_dict() - enums: Optional[Union[Dict[Union[str, EnumDefinitionName], Union[dict, "EnumDefinition"]], List[Union[dict, "EnumDefinition"]]]] = empty_dict() - slots: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, "SlotDefinition"]], List[Union[dict, "SlotDefinition"]]]] = empty_dict() - classes: Optional[Union[Dict[Union[str, ClassDefinitionName], Union[dict, "ClassDefinition"]], List[Union[dict, "ClassDefinition"]]]] = empty_dict() + subsets: Optional[Union[dict[Union[str, SubsetDefinitionName], Union[dict, "SubsetDefinition"]], list[Union[dict, "SubsetDefinition"]]]] = empty_dict() + types: Optional[Union[dict[Union[str, TypeDefinitionName], Union[dict, "TypeDefinition"]], list[Union[dict, "TypeDefinition"]]]] = empty_dict() + enums: Optional[Union[dict[Union[str, EnumDefinitionName], Union[dict, "EnumDefinition"]], list[Union[dict, "EnumDefinition"]]]] = empty_dict() + slots: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, "SlotDefinition"]], list[Union[dict, "SlotDefinition"]]]] = empty_dict() + classes: Optional[Union[dict[Union[str, ClassDefinitionName], Union[dict, "ClassDefinition"]], list[Union[dict, "ClassDefinition"]]]] = empty_dict() metamodel_version: Optional[str] = None source_file: Optional[str] = None source_file_date: Optional[Union[str, XSDDateTime]] = None source_file_size: Optional[int] = None generation_date: Optional[Union[str, XSDDateTime]] = None slot_names_unique: Optional[Union[bool, Bool]] = None - settings: Optional[Union[Dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], List[Union[dict, "Setting"]]]] = empty_dict() - bindings: Optional[Union[Union[dict, "EnumBinding"], List[Union[dict, "EnumBinding"]]]] = empty_list() + settings: Optional[Union[dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], list[Union[dict, "Setting"]]]] = empty_dict() + bindings: Optional[Union[Union[dict, "EnumBinding"], list[Union[dict, "EnumBinding"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.default_prefix is None: self.default_prefix = sfx(str(self.id)) if self._is_empty(self.name): @@ -633,7 +631,7 @@ class AnonymousTypeExpression(YAMLRoot): """ A type expression that is not a top-level named type definition. Used for nesting. """ - _inherited_slots: ClassVar[List[str]] = ["pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] + _inherited_slots: ClassVar[list[str]] = ["pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] class_class_uri: ClassVar[URIRef] = LINKML["AnonymousTypeExpression"] class_class_curie: ClassVar[str] = "linkml:AnonymousTypeExpression" @@ -645,16 +643,16 @@ class AnonymousTypeExpression(YAMLRoot): unit: Optional[Union[dict, UnitOfMeasure]] = None implicit_prefix: Optional[str] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None minimum_value: Optional[Union[dict, Anything]] = None maximum_value: Optional[Union[dict, Anything]] = None - none_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - any_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + any_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.pattern is not None and not isinstance(self.pattern, str): self.pattern = str(self.pattern) @@ -701,7 +699,7 @@ class TypeDefinition(Element): """ an element that whose instances are atomic scalar values that can be mapped to primitive types """ - _inherited_slots: ClassVar[List[str]] = ["base", "uri", "repr", "pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] + _inherited_slots: ClassVar[list[str]] = ["base", "uri", "repr", "pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] class_class_uri: ClassVar[URIRef] = LINKML["TypeDefinition"] class_class_curie: ClassVar[str] = "linkml:TypeDefinition" @@ -713,22 +711,22 @@ class TypeDefinition(Element): base: Optional[str] = None uri: Optional[Union[str, URIorCURIE]] = None repr: Optional[str] = None - union_of: Optional[Union[Union[str, TypeDefinitionName], List[Union[str, TypeDefinitionName]]]] = empty_list() + union_of: Optional[Union[Union[str, TypeDefinitionName], list[Union[str, TypeDefinitionName]]]] = empty_list() pattern: Optional[str] = None structured_pattern: Optional[Union[dict, "PatternExpression"]] = None unit: Optional[Union[dict, UnitOfMeasure]] = None implicit_prefix: Optional[str] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None minimum_value: Optional[Union[dict, Anything]] = None maximum_value: Optional[Union[dict, Anything]] = None - none_of: Optional[Union[Union[dict, AnonymousTypeExpression], List[Union[dict, AnonymousTypeExpression]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, AnonymousTypeExpression], List[Union[dict, AnonymousTypeExpression]]]] = empty_list() - any_of: Optional[Union[Union[dict, AnonymousTypeExpression], List[Union[dict, AnonymousTypeExpression]]]] = empty_list() - all_of: Optional[Union[Union[dict, AnonymousTypeExpression], List[Union[dict, AnonymousTypeExpression]]]] = empty_list() + none_of: Optional[Union[Union[dict, AnonymousTypeExpression], list[Union[dict, AnonymousTypeExpression]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, AnonymousTypeExpression], list[Union[dict, AnonymousTypeExpression]]]] = empty_list() + any_of: Optional[Union[Union[dict, AnonymousTypeExpression], list[Union[dict, AnonymousTypeExpression]]]] = empty_list() + all_of: Optional[Union[Union[dict, AnonymousTypeExpression], list[Union[dict, AnonymousTypeExpression]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, TypeDefinitionName): @@ -796,7 +794,7 @@ class SubsetDefinition(Element): """ an element that can be used to group other metamodel elements """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["SubsetDefinition"] class_class_curie: ClassVar[str] = "linkml:SubsetDefinition" @@ -805,7 +803,7 @@ class SubsetDefinition(Element): name: Union[str, SubsetDefinitionName] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, SubsetDefinitionName): @@ -819,7 +817,7 @@ class Definition(Element): """ abstract base class for core metaclasses """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Definition"] class_class_curie: ClassVar[str] = "linkml:Definition" @@ -830,12 +828,12 @@ class Definition(Element): is_a: Optional[Union[str, DefinitionName]] = None abstract: Optional[Union[bool, Bool]] = None mixin: Optional[Union[bool, Bool]] = None - mixins: Optional[Union[Union[str, DefinitionName], List[Union[str, DefinitionName]]]] = empty_list() - apply_to: Optional[Union[Union[str, DefinitionName], List[Union[str, DefinitionName]]]] = empty_list() - values_from: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + mixins: Optional[Union[Union[str, DefinitionName], list[Union[str, DefinitionName]]]] = empty_list() + apply_to: Optional[Union[Union[str, DefinitionName], list[Union[str, DefinitionName]]]] = empty_list() + values_from: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() string_serialization: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.is_a is not None and not isinstance(self.is_a, DefinitionName): self.is_a = DefinitionName(self.is_a) @@ -868,7 +866,7 @@ class AnonymousEnumExpression(YAMLRoot): """ An enum_expression that is not named """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["AnonymousEnumExpression"] class_class_curie: ClassVar[str] = "linkml:AnonymousEnumExpression" @@ -879,15 +877,15 @@ class AnonymousEnumExpression(YAMLRoot): code_set_tag: Optional[str] = None code_set_version: Optional[str] = None pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None - permissible_values: Optional[Union[Dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], List[Union[dict, "PermissibleValue"]]]] = empty_dict() - include: Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() - minus: Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() - inherits: Optional[Union[Union[str, EnumDefinitionName], List[Union[str, EnumDefinitionName]]]] = empty_list() + permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict() + include: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() + minus: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() + inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list() reachable_from: Optional[Union[dict, "ReachabilityQuery"]] = None matches: Optional[Union[dict, "MatchQuery"]] = None - concepts: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + concepts: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.code_set is not None and not isinstance(self.code_set, URIorCURIE): self.code_set = URIorCURIE(self.code_set) @@ -932,7 +930,7 @@ class EnumDefinition(Definition): """ an element whose instances must be drawn from a specified set of permissible values """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["EnumDefinition"] class_class_curie: ClassVar[str] = "linkml:EnumDefinition" @@ -945,15 +943,15 @@ class EnumDefinition(Definition): code_set_tag: Optional[str] = None code_set_version: Optional[str] = None pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None - permissible_values: Optional[Union[Dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], List[Union[dict, "PermissibleValue"]]]] = empty_dict() - include: Optional[Union[Union[dict, AnonymousEnumExpression], List[Union[dict, AnonymousEnumExpression]]]] = empty_list() - minus: Optional[Union[Union[dict, AnonymousEnumExpression], List[Union[dict, AnonymousEnumExpression]]]] = empty_list() - inherits: Optional[Union[Union[str, EnumDefinitionName], List[Union[str, EnumDefinitionName]]]] = empty_list() + permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict() + include: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list() + minus: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list() + inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list() reachable_from: Optional[Union[dict, "ReachabilityQuery"]] = None matches: Optional[Union[dict, "MatchQuery"]] = None - concepts: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + concepts: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, EnumDefinitionName): @@ -1006,7 +1004,7 @@ class EnumBinding(YAMLRoot): """ A binding of a slot or a class to a permissible value from an enumeration. """ - _inherited_slots: ClassVar[List[str]] = ["range"] + _inherited_slots: ClassVar[list[str]] = ["range"] class_class_uri: ClassVar[URIRef] = LINKML["EnumBinding"] class_class_curie: ClassVar[str] = "linkml:EnumBinding" @@ -1017,43 +1015,43 @@ class EnumBinding(YAMLRoot): obligation_level: Optional[Union[str, "ObligationLevelEnum"]] = None binds_value_of: Optional[str] = None pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], List[Union[dict, "StructuredAlias"]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], list[Union[dict, "StructuredAlias"]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.range is not None and not isinstance(self.range, EnumDefinitionName): self.range = EnumDefinitionName(self.range) @@ -1192,7 +1190,7 @@ class MatchQuery(YAMLRoot): A query that is used on an enum expression to dynamically obtain a set of permissivle values via a query that matches on properties of the external concepts. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["MatchQuery"] class_class_curie: ClassVar[str] = "linkml:MatchQuery" @@ -1202,7 +1200,7 @@ class MatchQuery(YAMLRoot): identifier_pattern: Optional[str] = None source_ontology: Optional[Union[str, URIorCURIE]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.identifier_pattern is not None and not isinstance(self.identifier_pattern, str): self.identifier_pattern = str(self.identifier_pattern) @@ -1218,7 +1216,7 @@ class ReachabilityQuery(YAMLRoot): A query that is used on an enum expression to dynamically obtain a set of permissible values via walking from a set of source nodes to a set of descendants or ancestors over a set of relationship types. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ReachabilityQuery"] class_class_curie: ClassVar[str] = "linkml:ReachabilityQuery" @@ -1226,13 +1224,13 @@ class ReachabilityQuery(YAMLRoot): class_model_uri: ClassVar[URIRef] = LINKML.ReachabilityQuery source_ontology: Optional[Union[str, URIorCURIE]] = None - source_nodes: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - relationship_types: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + source_nodes: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + relationship_types: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() is_direct: Optional[Union[bool, Bool]] = None include_self: Optional[Union[bool, Bool]] = None traverse_up: Optional[Union[bool, Bool]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.source_ontology is not None and not isinstance(self.source_ontology, URIorCURIE): self.source_ontology = URIorCURIE(self.source_ontology) @@ -1262,7 +1260,7 @@ class StructuredAlias(YAMLRoot): object that contains meta data about a synonym or alias including where it came from (source) and its scope (narrow, broad, etc.) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SKOSXL["Label"] class_class_curie: ClassVar[str] = "skosxl:Label" @@ -1271,44 +1269,44 @@ class StructuredAlias(YAMLRoot): literal_form: str = None predicate: Optional[Union[str, "AliasPredicateEnum"]] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - contexts: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + contexts: Optional[Union[Union[str, URI], list[Union[str, URI]]]] = empty_list() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], List[Union[dict, "StructuredAlias"]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, "StructuredAlias"], list[Union[dict, "StructuredAlias"]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - keywords: Optional[Union[str, List[str]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.literal_form): self.MissingRequiredField("literal_form") if not isinstance(self.literal_form, str): @@ -1445,7 +1443,7 @@ class Expression(YAMLRoot): """ general mixin for any class that can represent some form of expression """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Expression"] class_class_curie: ClassVar[str] = "linkml:Expression" @@ -1458,7 +1456,7 @@ class TypeExpression(Expression): """ An abstract class grouping named types and anonymous type expressions """ - _inherited_slots: ClassVar[List[str]] = ["pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] + _inherited_slots: ClassVar[list[str]] = ["pattern", "structured_pattern", "equals_string", "equals_string_in", "equals_number", "minimum_value", "maximum_value"] class_class_uri: ClassVar[URIRef] = LINKML["TypeExpression"] class_class_curie: ClassVar[str] = "linkml:TypeExpression" @@ -1470,16 +1468,16 @@ class TypeExpression(Expression): unit: Optional[Union[dict, UnitOfMeasure]] = None implicit_prefix: Optional[str] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None minimum_value: Optional[Union[dict, Anything]] = None maximum_value: Optional[Union[dict, Anything]] = None - none_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - any_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + any_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.pattern is not None and not isinstance(self.pattern, str): self.pattern = str(self.pattern) @@ -1526,7 +1524,7 @@ class EnumExpression(Expression): """ An expression that constrains the range of a slot """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["EnumExpression"] class_class_curie: ClassVar[str] = "linkml:EnumExpression" @@ -1537,15 +1535,15 @@ class EnumExpression(Expression): code_set_tag: Optional[str] = None code_set_version: Optional[str] = None pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None - permissible_values: Optional[Union[Dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], List[Union[dict, "PermissibleValue"]]]] = empty_dict() - include: Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() - minus: Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() - inherits: Optional[Union[Union[str, EnumDefinitionName], List[Union[str, EnumDefinitionName]]]] = empty_list() + permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict() + include: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() + minus: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list() + inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list() reachable_from: Optional[Union[dict, "ReachabilityQuery"]] = None matches: Optional[Union[dict, "MatchQuery"]] = None - concepts: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + concepts: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.code_set is not None and not isinstance(self.code_set, URIorCURIE): self.code_set = URIorCURIE(self.code_set) @@ -1590,50 +1588,50 @@ class AnonymousExpression(YAMLRoot): """ An abstract parent class for any nested expression """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["AnonymousExpression"] class_class_curie: ClassVar[str] = "linkml:AnonymousExpression" class_name: ClassVar[str] = "anonymous_expression" class_model_uri: ClassVar[URIRef] = LINKML.AnonymousExpression - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="extensions", slot_type=Extension, key_name="tag", keyed=True) self._normalize_inlined_as_dict(slot_name="annotations", slot_type=Annotation, key_name="tag", keyed=True) @@ -1759,7 +1757,7 @@ class PathExpression(YAMLRoot): """ An expression that describes an abstract path from an object to another through a sequence of slot lookups """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["PathExpression"] class_class_curie: ClassVar[str] = "linkml:PathExpression" @@ -1767,50 +1765,50 @@ class PathExpression(YAMLRoot): class_model_uri: ClassVar[URIRef] = LINKML.PathExpression followed_by: Optional[Union[dict, "PathExpression"]] = None - none_of: Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]] = empty_list() - any_of: Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]] = empty_list() + any_of: Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]] = empty_list() reversed: Optional[Union[bool, Bool]] = None traverse: Optional[Union[str, SlotDefinitionName]] = None range_expression: Optional[Union[dict, "AnonymousClassExpression"]] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.followed_by is not None and not isinstance(self.followed_by, PathExpression): self.followed_by = PathExpression(**as_dict(self.followed_by)) @@ -1964,7 +1962,7 @@ class SlotExpression(Expression): """ an expression that constrains the range of values a slot can take """ - _inherited_slots: ClassVar[List[str]] = ["range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] + _inherited_slots: ClassVar[list[str]] = ["range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] class_class_uri: ClassVar[URIRef] = LINKML["SlotExpression"] class_class_curie: ClassVar[str] = "linkml:SlotExpression" @@ -1974,7 +1972,7 @@ class SlotExpression(Expression): range: Optional[Union[str, ElementName]] = None range_expression: Optional[Union[dict, "AnonymousClassExpression"]] = None enum_range: Optional[Union[dict, EnumExpression]] = None - bindings: Optional[Union[Union[dict, EnumBinding], List[Union[dict, EnumBinding]]]] = empty_list() + bindings: Optional[Union[Union[dict, EnumBinding], list[Union[dict, EnumBinding]]]] = empty_list() required: Optional[Union[bool, Bool]] = None recommended: Optional[Union[bool, Bool]] = None multivalued: Optional[Union[bool, Bool]] = None @@ -1988,7 +1986,7 @@ class SlotExpression(Expression): implicit_prefix: Optional[str] = None value_presence: Optional[Union[str, "PresenceEnum"]] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None equals_expression: Optional[str] = None exact_cardinality: Optional[int] = None @@ -1996,12 +1994,12 @@ class SlotExpression(Expression): maximum_cardinality: Optional[int] = None has_member: Optional[Union[dict, "AnonymousSlotExpression"]] = None all_members: Optional[Union[dict, "AnonymousSlotExpression"]] = None - none_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - any_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + any_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.range is not None and not isinstance(self.range, ElementName): self.range = ElementName(self.range) @@ -2094,7 +2092,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass(repr=False) class AnonymousSlotExpression(AnonymousExpression): - _inherited_slots: ClassVar[List[str]] = ["range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] + _inherited_slots: ClassVar[list[str]] = ["range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] class_class_uri: ClassVar[URIRef] = LINKML["AnonymousSlotExpression"] class_class_curie: ClassVar[str] = "linkml:AnonymousSlotExpression" @@ -2104,7 +2102,7 @@ class AnonymousSlotExpression(AnonymousExpression): range: Optional[Union[str, ElementName]] = None range_expression: Optional[Union[dict, "AnonymousClassExpression"]] = None enum_range: Optional[Union[dict, EnumExpression]] = None - bindings: Optional[Union[Union[dict, EnumBinding], List[Union[dict, EnumBinding]]]] = empty_list() + bindings: Optional[Union[Union[dict, EnumBinding], list[Union[dict, EnumBinding]]]] = empty_list() required: Optional[Union[bool, Bool]] = None recommended: Optional[Union[bool, Bool]] = None multivalued: Optional[Union[bool, Bool]] = None @@ -2118,7 +2116,7 @@ class AnonymousSlotExpression(AnonymousExpression): implicit_prefix: Optional[str] = None value_presence: Optional[Union[str, "PresenceEnum"]] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None equals_expression: Optional[str] = None exact_cardinality: Optional[int] = None @@ -2126,12 +2124,12 @@ class AnonymousSlotExpression(AnonymousExpression): maximum_cardinality: Optional[int] = None has_member: Optional[Union[dict, "AnonymousSlotExpression"]] = None all_members: Optional[Union[dict, "AnonymousSlotExpression"]] = None - none_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - any_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + any_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.range is not None and not isinstance(self.range, ElementName): self.range = ElementName(self.range) @@ -2227,7 +2225,7 @@ class SlotDefinition(Definition): """ an element that describes how instances are related to other instances """ - _inherited_slots: ClassVar[List[str]] = ["domain", "array", "inherited", "readonly", "ifabsent", "list_elements_unique", "list_elements_ordered", "shared", "key", "identifier", "designates_type", "role", "relational_role", "range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] + _inherited_slots: ClassVar[list[str]] = ["domain", "array", "inherited", "readonly", "ifabsent", "list_elements_unique", "list_elements_ordered", "shared", "key", "identifier", "designates_type", "role", "relational_role", "range", "required", "recommended", "multivalued", "inlined", "inlined_as_list", "minimum_value", "maximum_value", "pattern", "structured_pattern", "value_presence", "equals_string", "equals_string_in", "equals_number", "equals_expression", "exact_cardinality", "minimum_cardinality", "maximum_cardinality"] class_class_uri: ClassVar[URIRef] = LINKML["SlotDefinition"] class_class_curie: ClassVar[str] = "linkml:SlotDefinition" @@ -2250,7 +2248,7 @@ class SlotDefinition(Definition): designates_type: Optional[Union[bool, Bool]] = None alias: Optional[str] = None owner: Optional[Union[str, DefinitionName]] = None - domain_of: Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]] = empty_list() + domain_of: Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]] = empty_list() subproperty_of: Optional[Union[str, SlotDefinitionName]] = None symmetric: Optional[Union[bool, Bool]] = None reflexive: Optional[Union[bool, Bool]] = None @@ -2269,17 +2267,17 @@ class SlotDefinition(Definition): slot_group: Optional[Union[str, SlotDefinitionName]] = None is_grouping_slot: Optional[Union[bool, Bool]] = None path_rule: Optional[Union[dict, PathExpression]] = None - disjoint_with: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() + disjoint_with: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() children_are_mutually_disjoint: Optional[Union[bool, Bool]] = None - union_of: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() - type_mappings: Optional[Union[Union[str, TypeMappingFramework], List[Union[str, TypeMappingFramework]]]] = empty_list() + union_of: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() + type_mappings: Optional[Union[Union[str, TypeMappingFramework], list[Union[str, TypeMappingFramework]]]] = empty_list() is_a: Optional[Union[str, SlotDefinitionName]] = None - mixins: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() - apply_to: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() + mixins: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() + apply_to: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() range: Optional[Union[str, ElementName]] = None range_expression: Optional[Union[dict, "AnonymousClassExpression"]] = None enum_range: Optional[Union[dict, EnumExpression]] = None - bindings: Optional[Union[Union[dict, EnumBinding], List[Union[dict, EnumBinding]]]] = empty_list() + bindings: Optional[Union[Union[dict, EnumBinding], list[Union[dict, EnumBinding]]]] = empty_list() required: Optional[Union[bool, Bool]] = None recommended: Optional[Union[bool, Bool]] = None multivalued: Optional[Union[bool, Bool]] = None @@ -2293,7 +2291,7 @@ class SlotDefinition(Definition): implicit_prefix: Optional[str] = None value_presence: Optional[Union[str, "PresenceEnum"]] = None equals_string: Optional[str] = None - equals_string_in: Optional[Union[str, List[str]]] = empty_list() + equals_string_in: Optional[Union[str, list[str]]] = empty_list() equals_number: Optional[int] = None equals_expression: Optional[str] = None exact_cardinality: Optional[int] = None @@ -2301,12 +2299,12 @@ class SlotDefinition(Definition): maximum_cardinality: Optional[int] = None has_member: Optional[Union[dict, AnonymousSlotExpression]] = None all_members: Optional[Union[dict, AnonymousSlotExpression]] = None - none_of: Optional[Union[Union[dict, AnonymousSlotExpression], List[Union[dict, AnonymousSlotExpression]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, AnonymousSlotExpression], List[Union[dict, AnonymousSlotExpression]]]] = empty_list() - any_of: Optional[Union[Union[dict, AnonymousSlotExpression], List[Union[dict, AnonymousSlotExpression]]]] = empty_list() - all_of: Optional[Union[Union[dict, AnonymousSlotExpression], List[Union[dict, AnonymousSlotExpression]]]] = empty_list() + none_of: Optional[Union[Union[dict, AnonymousSlotExpression], list[Union[dict, AnonymousSlotExpression]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, AnonymousSlotExpression], list[Union[dict, AnonymousSlotExpression]]]] = empty_list() + any_of: Optional[Union[Union[dict, AnonymousSlotExpression], list[Union[dict, AnonymousSlotExpression]]]] = empty_list() + all_of: Optional[Union[Union[dict, AnonymousSlotExpression], list[Union[dict, AnonymousSlotExpression]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, SlotDefinitionName): @@ -2536,20 +2534,20 @@ class ClassExpression(YAMLRoot): """ A boolean expression that can be used to dynamically determine membership of a class """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ClassExpression"] class_class_curie: ClassVar[str] = "linkml:ClassExpression" class_name: ClassVar[str] = "class_expression" class_model_uri: ClassVar[URIRef] = LINKML.ClassExpression - any_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - none_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - slot_conditions: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]] = empty_dict() + any_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + slot_conditions: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.any_of, list): self.any_of = [self.any_of] if self.any_of is not None else [] self.any_of = [v if isinstance(v, AnonymousClassExpression) else AnonymousClassExpression(**as_dict(v)) for v in self.any_of] @@ -2573,7 +2571,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass(repr=False) class AnonymousClassExpression(AnonymousExpression): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["AnonymousClassExpression"] class_class_curie: ClassVar[str] = "linkml:AnonymousClassExpression" @@ -2581,13 +2579,13 @@ class AnonymousClassExpression(AnonymousExpression): class_model_uri: ClassVar[URIRef] = LINKML.AnonymousClassExpression is_a: Optional[Union[str, DefinitionName]] = None - any_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - none_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - all_of: Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]] = empty_list() - slot_conditions: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]] = empty_dict() + any_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + none_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + all_of: Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]] = empty_list() + slot_conditions: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.is_a is not None and not isinstance(self.is_a, DefinitionName): self.is_a = DefinitionName(self.is_a) @@ -2617,7 +2615,7 @@ class ClassDefinition(Definition): """ an element whose instances are complex objects that may have slot-value assignments """ - _inherited_slots: ClassVar[List[str]] = ["defining_slots", "represents_relationship"] + _inherited_slots: ClassVar[list[str]] = ["defining_slots", "represents_relationship"] class_class_uri: ClassVar[URIRef] = LINKML["ClassDefinition"] class_class_curie: ClassVar[str] = "linkml:ClassDefinition" @@ -2625,31 +2623,31 @@ class ClassDefinition(Definition): class_model_uri: ClassVar[URIRef] = LINKML.ClassDefinition name: Union[str, ClassDefinitionName] = None - slots: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() - slot_usage: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]] = empty_dict() - attributes: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]] = empty_dict() + slots: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() + slot_usage: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]] = empty_dict() + attributes: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]] = empty_dict() class_uri: Optional[Union[str, URIorCURIE]] = None subclass_of: Optional[Union[str, URIorCURIE]] = None - union_of: Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]] = empty_list() - defining_slots: Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]] = empty_list() + union_of: Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]] = empty_list() + defining_slots: Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]] = empty_list() tree_root: Optional[Union[bool, Bool]] = None - unique_keys: Optional[Union[Dict[Union[str, UniqueKeyUniqueKeyName], Union[dict, "UniqueKey"]], List[Union[dict, "UniqueKey"]]]] = empty_dict() - rules: Optional[Union[Union[dict, "ClassRule"], List[Union[dict, "ClassRule"]]]] = empty_list() - classification_rules: Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]] = empty_list() + unique_keys: Optional[Union[dict[Union[str, UniqueKeyUniqueKeyName], Union[dict, "UniqueKey"]], list[Union[dict, "UniqueKey"]]]] = empty_dict() + rules: Optional[Union[Union[dict, "ClassRule"], list[Union[dict, "ClassRule"]]]] = empty_list() + classification_rules: Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]] = empty_list() slot_names_unique: Optional[Union[bool, Bool]] = None represents_relationship: Optional[Union[bool, Bool]] = None - disjoint_with: Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]] = empty_list() + disjoint_with: Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]] = empty_list() children_are_mutually_disjoint: Optional[Union[bool, Bool]] = None is_a: Optional[Union[str, ClassDefinitionName]] = None - mixins: Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]] = empty_list() - apply_to: Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]] = empty_list() - any_of: Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]] = empty_list() - exactly_one_of: Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]] = empty_list() - none_of: Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]] = empty_list() - all_of: Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]] = empty_list() - slot_conditions: Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]] = empty_dict() - - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + mixins: Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]] = empty_list() + apply_to: Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]] = empty_list() + any_of: Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]] = empty_list() + exactly_one_of: Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]] = empty_list() + none_of: Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]] = empty_list() + all_of: Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]] = empty_list() + slot_conditions: Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]] = empty_dict() + + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, ClassDefinitionName): @@ -2739,7 +2737,7 @@ class ClassLevelRule(YAMLRoot): """ A rule that is applied to classes """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ClassLevelRule"] class_class_curie: ClassVar[str] = "linkml:ClassLevelRule" @@ -2752,7 +2750,7 @@ class ClassRule(ClassLevelRule): """ A rule that applies to instances of a class """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ClassRule"] class_class_curie: ClassVar[str] = "linkml:ClassRule" @@ -2766,42 +2764,42 @@ class ClassRule(ClassLevelRule): open_world: Optional[Union[bool, Bool]] = None rank: Optional[int] = None deactivated: Optional[Union[bool, Bool]] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.preconditions is not None and not isinstance(self.preconditions, AnonymousClassExpression): self.preconditions = AnonymousClassExpression(**as_dict(self.preconditions)) @@ -2945,7 +2943,7 @@ class ArrayExpression(YAMLRoot): """ defines the dimensions of an array """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ArrayExpression"] class_class_curie: ClassVar[str] = "linkml:ArrayExpression" @@ -2955,44 +2953,44 @@ class ArrayExpression(YAMLRoot): exact_number_dimensions: Optional[int] = None minimum_number_dimensions: Optional[int] = None maximum_number_dimensions: Optional[Union[dict, Anything]] = None - dimensions: Optional[Union[Union[dict, "DimensionExpression"], List[Union[dict, "DimensionExpression"]]]] = empty_list() - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + dimensions: Optional[Union[Union[dict, "DimensionExpression"], list[Union[dict, "DimensionExpression"]]]] = empty_list() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.exact_number_dimensions is not None and not isinstance(self.exact_number_dimensions, int): self.exact_number_dimensions = int(self.exact_number_dimensions) @@ -3128,7 +3126,7 @@ class DimensionExpression(YAMLRoot): """ defines one of the dimensions of an array """ - _inherited_slots: ClassVar[List[str]] = ["maximum_cardinality", "minimum_cardinality", "exact_cardinality"] + _inherited_slots: ClassVar[list[str]] = ["maximum_cardinality", "minimum_cardinality", "exact_cardinality"] class_class_uri: ClassVar[URIRef] = LINKML["DimensionExpression"] class_class_curie: ClassVar[str] = "linkml:DimensionExpression" @@ -3139,43 +3137,43 @@ class DimensionExpression(YAMLRoot): maximum_cardinality: Optional[int] = None minimum_cardinality: Optional[int] = None exact_cardinality: Optional[int] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.alias is not None and not isinstance(self.alias, str): self.alias = str(self.alias) @@ -3313,7 +3311,7 @@ class PatternExpression(YAMLRoot): """ a regular expression pattern used to evaluate conformance of a string """ - _inherited_slots: ClassVar[List[str]] = ["syntax"] + _inherited_slots: ClassVar[list[str]] = ["syntax"] class_class_uri: ClassVar[URIRef] = LINKML["PatternExpression"] class_class_curie: ClassVar[str] = "linkml:PatternExpression" @@ -3323,43 +3321,43 @@ class PatternExpression(YAMLRoot): syntax: Optional[str] = None interpolated: Optional[Union[bool, Bool]] = None partial_match: Optional[Union[bool, Bool]] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.syntax is not None and not isinstance(self.syntax, str): self.syntax = str(self.syntax) @@ -3494,7 +3492,7 @@ class ImportExpression(YAMLRoot): """ an expression describing an import """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["ImportExpression"] class_class_curie: ClassVar[str] = "linkml:ImportExpression" @@ -3503,44 +3501,44 @@ class ImportExpression(YAMLRoot): import_from: Union[str, URIorCURIE] = None import_as: Optional[Union[str, NCName]] = None - import_map: Optional[Union[Dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], List[Union[dict, "Setting"]]]] = empty_dict() - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + import_map: Optional[Union[dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], list[Union[dict, "Setting"]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.import_from): self.MissingRequiredField("import_from") if not isinstance(self.import_from, URIorCURIE): @@ -3676,7 +3674,7 @@ class Setting(YAMLRoot): """ assignment of a key to a value """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Setting"] class_class_curie: ClassVar[str] = "linkml:Setting" @@ -3686,7 +3684,7 @@ class Setting(YAMLRoot): setting_key: Union[str, SettingSettingKey] = None setting_value: str = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.setting_key): self.MissingRequiredField("setting_key") if not isinstance(self.setting_key, SettingSettingKey): @@ -3705,7 +3703,7 @@ class Prefix(YAMLRoot): """ prefix URI tuple """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Prefix"] class_class_curie: ClassVar[str] = "linkml:Prefix" @@ -3715,7 +3713,7 @@ class Prefix(YAMLRoot): prefix_prefix: Union[str, PrefixPrefixPrefix] = None prefix_reference: Union[str, URI] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.prefix_prefix): self.MissingRequiredField("prefix_prefix") if not isinstance(self.prefix_prefix, PrefixPrefixPrefix): @@ -3734,7 +3732,7 @@ class LocalName(YAMLRoot): """ an attributed label """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["LocalName"] class_class_curie: ClassVar[str] = "linkml:LocalName" @@ -3744,7 +3742,7 @@ class LocalName(YAMLRoot): local_name_source: Union[str, LocalNameLocalNameSource] = None local_name_value: str = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.local_name_source): self.MissingRequiredField("local_name_source") if not isinstance(self.local_name_source, LocalNameLocalNameSource): @@ -3763,7 +3761,7 @@ class Example(YAMLRoot): """ usage example and description """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["Example"] class_class_curie: ClassVar[str] = "linkml:Example" @@ -3774,7 +3772,7 @@ class Example(YAMLRoot): description: Optional[str] = None object: Optional[Union[dict, Anything]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.value is not None and not isinstance(self.value, str): self.value = str(self.value) @@ -3789,7 +3787,7 @@ class AltDescription(YAMLRoot): """ an attributed description """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["AltDescription"] class_class_curie: ClassVar[str] = "linkml:AltDescription" @@ -3799,7 +3797,7 @@ class AltDescription(YAMLRoot): source: Union[str, AltDescriptionSource] = None description: str = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.source): self.MissingRequiredField("source") if not isinstance(self.source, AltDescriptionSource): @@ -3818,7 +3816,7 @@ class PermissibleValue(YAMLRoot): """ a permissible value, accompanied by intended text and an optional mapping to a concept URI """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["PermissibleValue"] class_class_curie: ClassVar[str] = "linkml:PermissibleValue" @@ -3829,46 +3827,46 @@ class PermissibleValue(YAMLRoot): description: Optional[str] = None meaning: Optional[Union[str, URIorCURIE]] = None unit: Optional[Union[dict, UnitOfMeasure]] = None - instantiates: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - implements: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + instantiates: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + implements: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() is_a: Optional[Union[str, PermissibleValueText]] = None - mixins: Optional[Union[Union[str, PermissibleValueText], List[Union[str, PermissibleValueText]]]] = empty_list() - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], List[Union[dict, AltDescription]]]] = empty_dict() + mixins: Optional[Union[Union[str, PermissibleValueText], list[Union[str, PermissibleValueText]]]] = empty_list() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], list[Union[dict, AltDescription]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, Example], List[Union[dict, Example]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, Example], list[Union[dict, Example]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.text): self.MissingRequiredField("text") if not isinstance(self.text, PermissibleValueText): @@ -4020,7 +4018,7 @@ class UniqueKey(YAMLRoot): """ a collection of slots whose values uniquely identify an instance of a class """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["UniqueKey"] class_class_curie: ClassVar[str] = "linkml:UniqueKey" @@ -4028,45 +4026,45 @@ class UniqueKey(YAMLRoot): class_model_uri: ClassVar[URIRef] = LINKML.UniqueKey unique_key_name: Union[str, UniqueKeyUniqueKeyName] = None - unique_key_slots: Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]] = None + unique_key_slots: Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]] = None consider_nulls_inequal: Optional[Union[bool, Bool]] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], List[Union[dict, AltDescription]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], list[Union[dict, AltDescription]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, Example], List[Union[dict, Example]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, Example], list[Union[dict, Example]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.unique_key_name): self.MissingRequiredField("unique_key_name") if not isinstance(self.unique_key_name, UniqueKeyUniqueKeyName): @@ -4206,7 +4204,7 @@ class TypeMapping(YAMLRoot): """ Represents how a slot or type can be serialized to a format. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML["TypeMapping"] class_class_curie: ClassVar[str] = "linkml:TypeMapping" @@ -4216,43 +4214,43 @@ class TypeMapping(YAMLRoot): framework: Union[str, TypeMappingFramework] = None type: Optional[Union[str, TypeDefinitionName]] = None string_serialization: Optional[str] = None - extensions: Optional[Union[Dict[Union[str, ExtensionTag], Union[dict, Extension]], List[Union[dict, Extension]]]] = empty_dict() - annotations: Optional[Union[Dict[Union[str, AnnotationTag], Union[dict, Annotation]], List[Union[dict, Annotation]]]] = empty_dict() + extensions: Optional[Union[dict[Union[str, ExtensionTag], Union[dict, Extension]], list[Union[dict, Extension]]]] = empty_dict() + annotations: Optional[Union[dict[Union[str, AnnotationTag], Union[dict, Annotation]], list[Union[dict, Annotation]]]] = empty_dict() description: Optional[str] = None - alt_descriptions: Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], List[Union[dict, AltDescription]]]] = empty_dict() + alt_descriptions: Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, AltDescription]], list[Union[dict, AltDescription]]]] = empty_dict() title: Optional[str] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() - examples: Optional[Union[Union[dict, Example], List[Union[dict, Example]]]] = empty_list() - in_subset: Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() + examples: Optional[Union[Union[dict, Example], list[Union[dict, Example]]]] = empty_list() + in_subset: Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None source: Optional[Union[str, URIorCURIE]] = None in_language: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() - structured_aliases: Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]] = empty_list() - mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - close_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - related_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - narrow_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - broad_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() + structured_aliases: Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]] = empty_list() + mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + close_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + related_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + narrow_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + broad_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_by: Optional[Union[str, URIorCURIE]] = None - contributors: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + contributors: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() created_on: Optional[Union[str, XSDDateTime]] = None last_updated_on: Optional[Union[str, XSDDateTime]] = None modified_by: Optional[Union[str, URIorCURIE]] = None status: Optional[Union[str, URIorCURIE]] = None rank: Optional[int] = None - categories: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() - keywords: Optional[Union[str, List[str]]] = empty_list() + categories: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() + keywords: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.framework): self.MissingRequiredField("framework") if not isinstance(self.framework, TypeMappingFramework): @@ -4512,22 +4510,22 @@ class slots: model_uri=LINKML.conforms_to, domain=Element, range=Optional[str]) slots.implements = Slot(uri=LINKML.implements, name="implements", curie=LINKML.curie('implements'), - model_uri=LINKML.implements, domain=Element, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.implements, domain=Element, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.instantiates = Slot(uri=LINKML.instantiates, name="instantiates", curie=LINKML.curie('instantiates'), - model_uri=LINKML.instantiates, domain=Element, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.instantiates, domain=Element, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.categories = Slot(uri=DCTERMS.subject, name="categories", curie=DCTERMS.curie('subject'), - model_uri=LINKML.categories, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.categories, domain=None, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.keywords = Slot(uri=SCHEMA.keywords, name="keywords", curie=SCHEMA.curie('keywords'), - model_uri=LINKML.keywords, domain=Element, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.keywords, domain=Element, range=Optional[Union[str, list[str]]]) slots.definition_uri = Slot(uri=LINKML.definition_uri, name="definition_uri", curie=LINKML.curie('definition_uri'), model_uri=LINKML.definition_uri, domain=Element, range=Optional[Union[str, URIorCURIE]]) slots.id_prefixes = Slot(uri=LINKML.id_prefixes, name="id_prefixes", curie=LINKML.curie('id_prefixes'), - model_uri=LINKML.id_prefixes, domain=Element, range=Optional[Union[Union[str, NCName], List[Union[str, NCName]]]]) + model_uri=LINKML.id_prefixes, domain=Element, range=Optional[Union[Union[str, NCName], list[Union[str, NCName]]]]) slots.id_prefixes_are_closed = Slot(uri=LINKML.id_prefixes_are_closed, name="id_prefixes_are_closed", curie=LINKML.curie('id_prefixes_are_closed'), model_uri=LINKML.id_prefixes_are_closed, domain=Element, range=Optional[Union[bool, Bool]]) @@ -4536,25 +4534,25 @@ class slots: model_uri=LINKML.description, domain=Element, range=Optional[str]) slots.structured_aliases = Slot(uri=SKOSXL.altLabel, name="structured_aliases", curie=SKOSXL.curie('altLabel'), - model_uri=LINKML.structured_aliases, domain=None, range=Optional[Union[Union[dict, StructuredAlias], List[Union[dict, StructuredAlias]]]]) + model_uri=LINKML.structured_aliases, domain=None, range=Optional[Union[Union[dict, StructuredAlias], list[Union[dict, StructuredAlias]]]]) slots.aliases = Slot(uri=SKOS.altLabel, name="aliases", curie=SKOS.curie('altLabel'), - model_uri=LINKML.aliases, domain=Element, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.aliases, domain=Element, range=Optional[Union[str, list[str]]]) slots.deprecated = Slot(uri=LINKML.deprecated, name="deprecated", curie=LINKML.curie('deprecated'), model_uri=LINKML.deprecated, domain=Element, range=Optional[str]) slots.todos = Slot(uri=LINKML.todos, name="todos", curie=LINKML.curie('todos'), - model_uri=LINKML.todos, domain=Element, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.todos, domain=Element, range=Optional[Union[str, list[str]]]) slots.notes = Slot(uri=SKOS.editorialNote, name="notes", curie=SKOS.curie('editorialNote'), - model_uri=LINKML.notes, domain=Element, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.notes, domain=Element, range=Optional[Union[str, list[str]]]) slots.comments = Slot(uri=SKOS.note, name="comments", curie=SKOS.curie('note'), - model_uri=LINKML.comments, domain=Element, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.comments, domain=Element, range=Optional[Union[str, list[str]]]) slots.in_subset = Slot(uri=OIO.inSubset, name="in_subset", curie=OIO.curie('inSubset'), - model_uri=LINKML.in_subset, domain=Element, range=Optional[Union[Union[str, SubsetDefinitionName], List[Union[str, SubsetDefinitionName]]]]) + model_uri=LINKML.in_subset, domain=Element, range=Optional[Union[Union[str, SubsetDefinitionName], list[Union[str, SubsetDefinitionName]]]]) slots.from_schema = Slot(uri=SKOS.inScheme, name="from_schema", curie=SKOS.curie('inScheme'), model_uri=LINKML.from_schema, domain=Element, range=Optional[Union[str, URI]]) @@ -4563,7 +4561,7 @@ class slots: model_uri=LINKML.imported_from, domain=Element, range=Optional[str]) slots.see_also = Slot(uri=RDFS.seeAlso, name="see_also", curie=RDFS.curie('seeAlso'), - model_uri=LINKML.see_also, domain=Element, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.see_also, domain=Element, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.owned_by = Slot(uri=LINKML.owned_by, name="owned_by", curie=LINKML.curie('owned_by'), model_uri=LINKML.owned_by, domain=Element, range=Optional[Union[str, URIorCURIE]]) @@ -4572,7 +4570,7 @@ class slots: model_uri=LINKML.created_by, domain=Element, range=Optional[Union[str, URIorCURIE]]) slots.contributors = Slot(uri=DCTERMS.contributor, name="contributors", curie=DCTERMS.curie('contributor'), - model_uri=LINKML.contributors, domain=Element, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.contributors, domain=Element, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.created_on = Slot(uri=PAV.createdOn, name="created_on", curie=PAV.curie('createdOn'), model_uri=LINKML.created_on, domain=Element, range=Optional[Union[str, XSDDateTime]]) @@ -4593,7 +4591,7 @@ class slots: model_uri=LINKML.alias_predicate, domain=StructuredAlias, range=Optional[Union[str, "AliasPredicateEnum"]]) slots.alias_contexts = Slot(uri=LINKML.contexts, name="alias_contexts", curie=LINKML.curie('contexts'), - model_uri=LINKML.alias_contexts, domain=StructuredAlias, range=Optional[Union[Union[str, URI], List[Union[str, URI]]]]) + model_uri=LINKML.alias_contexts, domain=StructuredAlias, range=Optional[Union[Union[str, URI], list[Union[str, URI]]]]) slots.in_language = Slot(uri=SCHEMA.inLanguage, name="in_language", curie=SCHEMA.curie('inLanguage'), model_uri=LINKML.in_language, domain=None, range=Optional[str]) @@ -4614,13 +4612,13 @@ class slots: model_uri=LINKML.mixin, domain=Definition, range=Optional[Union[bool, Bool]]) slots.mixins = Slot(uri=LINKML.mixins, name="mixins", curie=LINKML.curie('mixins'), - model_uri=LINKML.mixins, domain=None, range=Optional[Union[Union[str, DefinitionName], List[Union[str, DefinitionName]]]]) + model_uri=LINKML.mixins, domain=None, range=Optional[Union[Union[str, DefinitionName], list[Union[str, DefinitionName]]]]) slots.apply_to = Slot(uri=LINKML.apply_to, name="apply_to", curie=LINKML.curie('apply_to'), - model_uri=LINKML.apply_to, domain=Definition, range=Optional[Union[Union[str, DefinitionName], List[Union[str, DefinitionName]]]]) + model_uri=LINKML.apply_to, domain=Definition, range=Optional[Union[Union[str, DefinitionName], list[Union[str, DefinitionName]]]]) slots.values_from = Slot(uri=LINKML.values_from, name="values_from", curie=LINKML.curie('values_from'), - model_uri=LINKML.values_from, domain=Definition, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.values_from, domain=Definition, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.code_set = Slot(uri=LINKML.code_set, name="code_set", curie=LINKML.curie('code_set'), model_uri=LINKML.code_set, domain=EnumExpression, range=Optional[Union[str, URIorCURIE]]) @@ -4635,19 +4633,19 @@ class slots: model_uri=LINKML.pv_formula, domain=None, range=Optional[Union[str, "PvFormulaOptions"]]) slots.permissible_values = Slot(uri=LINKML.permissible_values, name="permissible_values", curie=LINKML.curie('permissible_values'), - model_uri=LINKML.permissible_values, domain=EnumExpression, range=Optional[Union[Dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], List[Union[dict, "PermissibleValue"]]]]) + model_uri=LINKML.permissible_values, domain=EnumExpression, range=Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]]) slots.enum_uri = Slot(uri=LINKML.enum_uri, name="enum_uri", curie=LINKML.curie('enum_uri'), model_uri=LINKML.enum_uri, domain=EnumDefinition, range=Optional[Union[str, URIorCURIE]]) slots.include = Slot(uri=LINKML.include, name="include", curie=LINKML.curie('include'), - model_uri=LINKML.include, domain=EnumExpression, range=Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]]) + model_uri=LINKML.include, domain=EnumExpression, range=Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]]) slots.minus = Slot(uri=LINKML.minus, name="minus", curie=LINKML.curie('minus'), - model_uri=LINKML.minus, domain=EnumExpression, range=Optional[Union[Union[dict, "AnonymousEnumExpression"], List[Union[dict, "AnonymousEnumExpression"]]]]) + model_uri=LINKML.minus, domain=EnumExpression, range=Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]]) slots.inherits = Slot(uri=LINKML.inherits, name="inherits", curie=LINKML.curie('inherits'), - model_uri=LINKML.inherits, domain=EnumExpression, range=Optional[Union[Union[str, EnumDefinitionName], List[Union[str, EnumDefinitionName]]]]) + model_uri=LINKML.inherits, domain=EnumExpression, range=Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]]) slots.matches = Slot(uri=LINKML.matches, name="matches", curie=LINKML.curie('matches'), model_uri=LINKML.matches, domain=EnumExpression, range=Optional[Union[dict, "MatchQuery"]]) @@ -4656,7 +4654,7 @@ class slots: model_uri=LINKML.identifier_pattern, domain=MatchQuery, range=Optional[str]) slots.concepts = Slot(uri=LINKML.concepts, name="concepts", curie=LINKML.curie('concepts'), - model_uri=LINKML.concepts, domain=EnumExpression, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.concepts, domain=EnumExpression, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.reachable_from = Slot(uri=LINKML.reachable_from, name="reachable_from", curie=LINKML.curie('reachable_from'), model_uri=LINKML.reachable_from, domain=EnumExpression, range=Optional[Union[dict, "ReachabilityQuery"]]) @@ -4674,10 +4672,10 @@ class slots: model_uri=LINKML.include_self, domain=ReachabilityQuery, range=Optional[Union[bool, Bool]]) slots.relationship_types = Slot(uri=LINKML.relationship_types, name="relationship_types", curie=LINKML.curie('relationship_types'), - model_uri=LINKML.relationship_types, domain=ReachabilityQuery, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.relationship_types, domain=ReachabilityQuery, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.source_nodes = Slot(uri=LINKML.source_nodes, name="source_nodes", curie=LINKML.curie('source_nodes'), - model_uri=LINKML.source_nodes, domain=ReachabilityQuery, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.source_nodes, domain=ReachabilityQuery, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.text = Slot(uri=LINKML.text, name="text", curie=LINKML.curie('text'), model_uri=LINKML.text, domain=PermissibleValue, range=Union[str, PermissibleValueText]) @@ -4689,22 +4687,22 @@ class slots: model_uri=LINKML.id, domain=SchemaDefinition, range=Union[str, URI]) slots.emit_prefixes = Slot(uri=LINKML.emit_prefixes, name="emit_prefixes", curie=LINKML.curie('emit_prefixes'), - model_uri=LINKML.emit_prefixes, domain=SchemaDefinition, range=Optional[Union[Union[str, NCName], List[Union[str, NCName]]]]) + model_uri=LINKML.emit_prefixes, domain=SchemaDefinition, range=Optional[Union[Union[str, NCName], list[Union[str, NCName]]]]) slots.version = Slot(uri=PAV.version, name="version", curie=PAV.curie('version'), model_uri=LINKML.version, domain=SchemaDefinition, range=Optional[str]) slots.imports = Slot(uri=LINKML.imports, name="imports", curie=LINKML.curie('imports'), - model_uri=LINKML.imports, domain=SchemaDefinition, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.imports, domain=SchemaDefinition, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.structured_imports = Slot(uri=LINKML.structured_imports, name="structured_imports", curie=LINKML.curie('structured_imports'), - model_uri=LINKML.structured_imports, domain=SchemaDefinition, range=Optional[Union[Union[dict, "ImportExpression"], List[Union[dict, "ImportExpression"]]]]) + model_uri=LINKML.structured_imports, domain=SchemaDefinition, range=Optional[Union[Union[dict, "ImportExpression"], list[Union[dict, "ImportExpression"]]]]) slots.license = Slot(uri=DCTERMS.license, name="license", curie=DCTERMS.curie('license'), model_uri=LINKML.license, domain=SchemaDefinition, range=Optional[str]) slots.default_curi_maps = Slot(uri=LINKML.default_curi_maps, name="default_curi_maps", curie=LINKML.curie('default_curi_maps'), - model_uri=LINKML.default_curi_maps, domain=SchemaDefinition, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.default_curi_maps, domain=SchemaDefinition, range=Optional[Union[str, list[str]]]) slots.default_prefix = Slot(uri=LINKML.default_prefix, name="default_prefix", curie=LINKML.curie('default_prefix'), model_uri=LINKML.default_prefix, domain=SchemaDefinition, range=Optional[str]) @@ -4713,19 +4711,19 @@ class slots: model_uri=LINKML.default_range, domain=SchemaDefinition, range=Optional[Union[str, TypeDefinitionName]]) slots.subsets = Slot(uri=LINKML.subsets, name="subsets", curie=LINKML.curie('subsets'), - model_uri=LINKML.subsets, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, SubsetDefinitionName], Union[dict, "SubsetDefinition"]], List[Union[dict, "SubsetDefinition"]]]]) + model_uri=LINKML.subsets, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, SubsetDefinitionName], Union[dict, "SubsetDefinition"]], list[Union[dict, "SubsetDefinition"]]]]) slots.types = Slot(uri=LINKML.types, name="types", curie=LINKML.curie('types'), - model_uri=LINKML.types, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, TypeDefinitionName], Union[dict, "TypeDefinition"]], List[Union[dict, "TypeDefinition"]]]]) + model_uri=LINKML.types, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, TypeDefinitionName], Union[dict, "TypeDefinition"]], list[Union[dict, "TypeDefinition"]]]]) slots.enums = Slot(uri=LINKML.enums, name="enums", curie=LINKML.curie('enums'), - model_uri=LINKML.enums, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, EnumDefinitionName], Union[dict, "EnumDefinition"]], List[Union[dict, "EnumDefinition"]]]]) + model_uri=LINKML.enums, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, EnumDefinitionName], Union[dict, "EnumDefinition"]], list[Union[dict, "EnumDefinition"]]]]) slots.slot_definitions = Slot(uri=LINKML.slots, name="slot_definitions", curie=LINKML.curie('slots'), - model_uri=LINKML.slot_definitions, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, "SlotDefinition"]], List[Union[dict, "SlotDefinition"]]]]) + model_uri=LINKML.slot_definitions, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, "SlotDefinition"]], list[Union[dict, "SlotDefinition"]]]]) slots.classes = Slot(uri=LINKML.classes, name="classes", curie=LINKML.curie('classes'), - model_uri=LINKML.classes, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, ClassDefinitionName], Union[dict, "ClassDefinition"]], List[Union[dict, "ClassDefinition"]]]]) + model_uri=LINKML.classes, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, ClassDefinitionName], Union[dict, "ClassDefinition"]], list[Union[dict, "ClassDefinition"]]]]) slots.metamodel_version = Slot(uri=LINKML.metamodel_version, name="metamodel_version", curie=LINKML.curie('metamodel_version'), model_uri=LINKML.metamodel_version, domain=SchemaDefinition, range=Optional[str]) @@ -4743,10 +4741,10 @@ class slots: model_uri=LINKML.generation_date, domain=SchemaDefinition, range=Optional[Union[str, XSDDateTime]]) slots.slots = Slot(uri=LINKML.slots, name="slots", curie=LINKML.curie('slots'), - model_uri=LINKML.slots, domain=ClassDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.slots, domain=ClassDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.slot_usage = Slot(uri=LINKML.slot_usage, name="slot_usage", curie=LINKML.curie('slot_usage'), - model_uri=LINKML.slot_usage, domain=ClassDefinition, range=Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]]) + model_uri=LINKML.slot_usage, domain=ClassDefinition, range=Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]]) slots.enum_range = Slot(uri=LINKML.enum_range, name="enum_range", curie=LINKML.curie('enum_range'), model_uri=LINKML.enum_range, domain=None, range=Optional[Union[dict, EnumExpression]]) @@ -4755,19 +4753,19 @@ class slots: model_uri=LINKML.range_expression, domain=None, range=Optional[Union[dict, "AnonymousClassExpression"]]) slots.boolean_slot = Slot(uri=LINKML.boolean_slot, name="boolean_slot", curie=LINKML.curie('boolean_slot'), - model_uri=LINKML.boolean_slot, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=LINKML.boolean_slot, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.any_of = Slot(uri=LINKML.any_of, name="any_of", curie=LINKML.curie('any_of'), - model_uri=LINKML.any_of, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=LINKML.any_of, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.exactly_one_of = Slot(uri=LINKML.exactly_one_of, name="exactly_one_of", curie=LINKML.curie('exactly_one_of'), - model_uri=LINKML.exactly_one_of, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=LINKML.exactly_one_of, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.none_of = Slot(uri=LINKML.none_of, name="none_of", curie=LINKML.curie('none_of'), - model_uri=LINKML.none_of, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=LINKML.none_of, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.all_of = Slot(uri=LINKML.all_of, name="all_of", curie=LINKML.curie('all_of'), - model_uri=LINKML.all_of, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=LINKML.all_of, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.preconditions = Slot(uri=SH.condition, name="preconditions", curie=SH.curie('condition'), model_uri=LINKML.preconditions, domain=None, range=Optional[Union[dict, AnonymousClassExpression]]) @@ -4791,16 +4789,16 @@ class slots: model_uri=LINKML.deactivated, domain=None, range=Optional[Union[bool, Bool]]) slots.rules = Slot(uri=SH.rule, name="rules", curie=SH.curie('rule'), - model_uri=LINKML.rules, domain=ClassDefinition, range=Optional[Union[Union[dict, "ClassRule"], List[Union[dict, "ClassRule"]]]]) + model_uri=LINKML.rules, domain=ClassDefinition, range=Optional[Union[Union[dict, "ClassRule"], list[Union[dict, "ClassRule"]]]]) slots.classification_rules = Slot(uri=LINKML.classification_rules, name="classification_rules", curie=LINKML.curie('classification_rules'), - model_uri=LINKML.classification_rules, domain=ClassDefinition, range=Optional[Union[Union[dict, AnonymousClassExpression], List[Union[dict, AnonymousClassExpression]]]]) + model_uri=LINKML.classification_rules, domain=ClassDefinition, range=Optional[Union[Union[dict, AnonymousClassExpression], list[Union[dict, AnonymousClassExpression]]]]) slots.slot_conditions = Slot(uri=LINKML.slot_conditions, name="slot_conditions", curie=LINKML.curie('slot_conditions'), - model_uri=LINKML.slot_conditions, domain=None, range=Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]]) + model_uri=LINKML.slot_conditions, domain=None, range=Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]]) slots.attributes = Slot(uri=LINKML.attributes, name="attributes", curie=LINKML.curie('attributes'), - model_uri=LINKML.attributes, domain=ClassDefinition, range=Optional[Union[Dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], List[Union[dict, SlotDefinition]]]]) + model_uri=LINKML.attributes, domain=ClassDefinition, range=Optional[Union[dict[Union[str, SlotDefinitionName], Union[dict, SlotDefinition]], list[Union[dict, SlotDefinition]]]]) slots.class_uri = Slot(uri=LINKML.class_uri, name="class_uri", curie=LINKML.curie('class_uri'), model_uri=LINKML.class_uri, domain=ClassDefinition, range=Optional[Union[str, URIorCURIE]]) @@ -4809,16 +4807,16 @@ class slots: model_uri=LINKML.subclass_of, domain=ClassDefinition, range=Optional[Union[str, URIorCURIE]]) slots.defining_slots = Slot(uri=LINKML.defining_slots, name="defining_slots", curie=LINKML.curie('defining_slots'), - model_uri=LINKML.defining_slots, domain=ClassDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.defining_slots, domain=ClassDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.union_of = Slot(uri=LINKML.union_of, name="union_of", curie=LINKML.curie('union_of'), - model_uri=LINKML.union_of, domain=Element, range=Optional[Union[Union[str, ElementName], List[Union[str, ElementName]]]]) + model_uri=LINKML.union_of, domain=Element, range=Optional[Union[Union[str, ElementName], list[Union[str, ElementName]]]]) slots.tree_root = Slot(uri=LINKML.tree_root, name="tree_root", curie=LINKML.curie('tree_root'), model_uri=LINKML.tree_root, domain=ClassDefinition, range=Optional[Union[bool, Bool]]) slots.unique_keys = Slot(uri=LINKML.unique_keys, name="unique_keys", curie=LINKML.curie('unique_keys'), - model_uri=LINKML.unique_keys, domain=ClassDefinition, range=Optional[Union[Dict[Union[str, UniqueKeyUniqueKeyName], Union[dict, "UniqueKey"]], List[Union[dict, "UniqueKey"]]]]) + model_uri=LINKML.unique_keys, domain=ClassDefinition, range=Optional[Union[dict[Union[str, UniqueKeyUniqueKeyName], Union[dict, "UniqueKey"]], list[Union[dict, "UniqueKey"]]]]) slots.unique_key_name = Slot(uri=LINKML.unique_key_name, name="unique_key_name", curie=LINKML.curie('unique_key_name'), model_uri=LINKML.unique_key_name, domain=UniqueKey, range=Union[str, UniqueKeyUniqueKeyName]) @@ -4827,7 +4825,7 @@ class slots: model_uri=LINKML.consider_nulls_inequal, domain=UniqueKey, range=Optional[Union[bool, Bool]]) slots.unique_key_slots = Slot(uri=LINKML.unique_key_slots, name="unique_key_slots", curie=LINKML.curie('unique_key_slots'), - model_uri=LINKML.unique_key_slots, domain=UniqueKey, range=Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]) + model_uri=LINKML.unique_key_slots, domain=UniqueKey, range=Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]) slots.slot_names_unique = Slot(uri=LINKML.slot_names_unique, name="slot_names_unique", curie=LINKML.curie('slot_names_unique'), model_uri=LINKML.slot_names_unique, domain=Definition, range=Optional[Union[bool, Bool]]) @@ -4848,7 +4846,7 @@ class slots: model_uri=LINKML.array, domain=SlotDefinition, range=Optional[Union[dict, "ArrayExpression"]]) slots.dimensions = Slot(uri=LINKML.dimensions, name="dimensions", curie=LINKML.curie('dimensions'), - model_uri=LINKML.dimensions, domain=ArrayExpression, range=Optional[Union[Union[dict, "DimensionExpression"], List[Union[dict, "DimensionExpression"]]]]) + model_uri=LINKML.dimensions, domain=ArrayExpression, range=Optional[Union[Union[dict, "DimensionExpression"], list[Union[dict, "DimensionExpression"]]]]) slots.minimum_number_dimensions = Slot(uri=LINKML.minimum_number_dimensions, name="minimum_number_dimensions", curie=LINKML.curie('minimum_number_dimensions'), model_uri=LINKML.minimum_number_dimensions, domain=ArrayExpression, range=Optional[int]) @@ -4899,10 +4897,10 @@ class slots: model_uri=LINKML.maximum_cardinality, domain=None, range=Optional[int]) slots.equals_string_in = Slot(uri=LINKML.equals_string_in, name="equals_string_in", curie=LINKML.curie('equals_string_in'), - model_uri=LINKML.equals_string_in, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=LINKML.equals_string_in, domain=None, range=Optional[Union[str, list[str]]]) slots.equals_number_in = Slot(uri=LINKML.equals_number_in, name="equals_number_in", curie=LINKML.curie('equals_number_in'), - model_uri=LINKML.equals_number_in, domain=None, range=Optional[Union[int, List[int]]]) + model_uri=LINKML.equals_number_in, domain=None, range=Optional[Union[int, list[int]]]) slots.has_member = Slot(uri=LINKML.has_member, name="has_member", curie=LINKML.curie('has_member'), model_uri=LINKML.has_member, domain=None, range=Optional[Union[dict, AnonymousSlotExpression]]) @@ -4956,7 +4954,7 @@ class slots: model_uri=LINKML.owner, domain=SlotDefinition, range=Optional[Union[str, DefinitionName]]) slots.domain_of = Slot(uri=LINKML.domain_of, name="domain_of", curie=LINKML.curie('domain_of'), - model_uri=LINKML.domain_of, domain=SlotDefinition, range=Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]]) + model_uri=LINKML.domain_of, domain=SlotDefinition, range=Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]]) slots.is_usage_slot = Slot(uri=LINKML.is_usage_slot, name="is_usage_slot", curie=LINKML.curie('is_usage_slot'), model_uri=LINKML.is_usage_slot, domain=SlotDefinition, range=Optional[Union[bool, Bool]]) @@ -4968,7 +4966,7 @@ class slots: model_uri=LINKML.subproperty_of, domain=SlotDefinition, range=Optional[Union[str, SlotDefinitionName]]) slots.disjoint_with = Slot(uri=LINKML.disjoint_with, name="disjoint_with", curie=LINKML.curie('disjoint_with'), - model_uri=LINKML.disjoint_with, domain=Definition, range=Optional[Union[Union[str, DefinitionName], List[Union[str, DefinitionName]]]]) + model_uri=LINKML.disjoint_with, domain=Definition, range=Optional[Union[Union[str, DefinitionName], list[Union[str, DefinitionName]]]]) slots.children_are_mutually_disjoint = Slot(uri=LINKML.children_are_mutually_disjoint, name="children_are_mutually_disjoint", curie=LINKML.curie('children_are_mutually_disjoint'), model_uri=LINKML.children_are_mutually_disjoint, domain=Definition, range=Optional[Union[bool, Bool]]) @@ -5034,7 +5032,7 @@ class slots: model_uri=LINKML.string_serialization, domain=Definition, range=Optional[str]) slots.bindings = Slot(uri=LINKML.bindings, name="bindings", curie=LINKML.curie('bindings'), - model_uri=LINKML.bindings, domain=Element, range=Optional[Union[Union[dict, "EnumBinding"], List[Union[dict, "EnumBinding"]]]]) + model_uri=LINKML.bindings, domain=Element, range=Optional[Union[Union[dict, "EnumBinding"], list[Union[dict, "EnumBinding"]]]]) slots.binds_value_of = Slot(uri=LINKML.binds_value_of, name="binds_value_of", curie=LINKML.curie('binds_value_of'), model_uri=LINKML.binds_value_of, domain=EnumBinding, range=Optional[str]) @@ -5043,7 +5041,7 @@ class slots: model_uri=LINKML.obligation_level, domain=None, range=Optional[Union[str, "ObligationLevelEnum"]]) slots.type_mappings = Slot(uri=LINKML.type_mappings, name="type_mappings", curie=LINKML.curie('type_mappings'), - model_uri=LINKML.type_mappings, domain=None, range=Optional[Union[Union[str, TypeMappingFramework], List[Union[str, TypeMappingFramework]]]]) + model_uri=LINKML.type_mappings, domain=None, range=Optional[Union[Union[str, TypeMappingFramework], list[Union[str, TypeMappingFramework]]]]) slots.framework_key = Slot(uri=LINKML.framework, name="framework_key", curie=LINKML.curie('framework'), model_uri=LINKML.framework_key, domain=None, range=URIRef) @@ -5070,7 +5068,7 @@ class slots: model_uri=LINKML.alt_description_source, domain=AltDescription, range=Union[str, AltDescriptionSource]) slots.alt_descriptions = Slot(uri=LINKML.alt_descriptions, name="alt_descriptions", curie=LINKML.curie('alt_descriptions'), - model_uri=LINKML.alt_descriptions, domain=Element, range=Optional[Union[Dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], List[Union[dict, "AltDescription"]]]]) + model_uri=LINKML.alt_descriptions, domain=Element, range=Optional[Union[dict[Union[str, AltDescriptionSource], Union[dict, "AltDescription"]], list[Union[dict, "AltDescription"]]]]) slots.value = Slot(uri=SKOS.example, name="value", curie=SKOS.curie('example'), model_uri=LINKML.value, domain=Example, range=Optional[str]) @@ -5082,7 +5080,7 @@ class slots: model_uri=LINKML.value_object, domain=Example, range=Optional[Union[dict, Anything]]) slots.examples = Slot(uri=LINKML.examples, name="examples", curie=LINKML.curie('examples'), - model_uri=LINKML.examples, domain=Element, range=Optional[Union[Union[dict, "Example"], List[Union[dict, "Example"]]]]) + model_uri=LINKML.examples, domain=Element, range=Optional[Union[Union[dict, "Example"], list[Union[dict, "Example"]]]]) slots.prefix_prefix = Slot(uri=SH.prefix, name="prefix_prefix", curie=SH.curie('prefix'), model_uri=LINKML.prefix_prefix, domain=Prefix, range=Union[str, PrefixPrefixPrefix]) @@ -5091,7 +5089,7 @@ class slots: model_uri=LINKML.prefix_reference, domain=Prefix, range=Union[str, URI]) slots.prefixes = Slot(uri=SH.declare, name="prefixes", curie=SH.curie('declare'), - model_uri=LINKML.prefixes, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, PrefixPrefixPrefix], Union[dict, "Prefix"]], List[Union[dict, "Prefix"]]]]) + model_uri=LINKML.prefixes, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, PrefixPrefixPrefix], Union[dict, "Prefix"]], list[Union[dict, "Prefix"]]]]) slots.setting_key = Slot(uri=LINKML.setting_key, name="setting_key", curie=LINKML.curie('setting_key'), model_uri=LINKML.setting_key, domain=Setting, range=Union[str, SettingSettingKey]) @@ -5100,7 +5098,7 @@ class slots: model_uri=LINKML.setting_value, domain=Setting, range=str) slots.settings = Slot(uri=LINKML.settings, name="settings", curie=LINKML.curie('settings'), - model_uri=LINKML.settings, domain=SchemaDefinition, range=Optional[Union[Dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], List[Union[dict, "Setting"]]]]) + model_uri=LINKML.settings, domain=SchemaDefinition, range=Optional[Union[dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], list[Union[dict, "Setting"]]]]) slots.import_from = Slot(uri=LINKML.import_from, name="import_from", curie=LINKML.curie('import_from'), model_uri=LINKML.import_from, domain=ImportExpression, range=Union[str, URIorCURIE]) @@ -5109,7 +5107,7 @@ class slots: model_uri=LINKML.import_as, domain=ImportExpression, range=Optional[Union[str, NCName]]) slots.import_map = Slot(uri=LINKML.import_map, name="import_map", curie=LINKML.curie('import_map'), - model_uri=LINKML.import_map, domain=ImportExpression, range=Optional[Union[Dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], List[Union[dict, "Setting"]]]]) + model_uri=LINKML.import_map, domain=ImportExpression, range=Optional[Union[dict[Union[str, SettingSettingKey], Union[dict, "Setting"]], list[Union[dict, "Setting"]]]]) slots.local_name_source = Slot(uri=LINKML.local_name_source, name="local_name_source", curie=LINKML.curie('local_name_source'), model_uri=LINKML.local_name_source, domain=LocalName, range=Union[str, LocalNameLocalNameSource]) @@ -5118,7 +5116,7 @@ class slots: model_uri=LINKML.local_name_value, domain=LocalName, range=str) slots.local_names = Slot(uri=LINKML.local_names, name="local_names", curie=LINKML.curie('local_names'), - model_uri=LINKML.local_names, domain=Element, range=Optional[Union[Dict[Union[str, LocalNameLocalNameSource], Union[dict, "LocalName"]], List[Union[dict, "LocalName"]]]]) + model_uri=LINKML.local_names, domain=Element, range=Optional[Union[dict[Union[str, LocalNameLocalNameSource], Union[dict, "LocalName"]], list[Union[dict, "LocalName"]]]]) slots.slot_group = Slot(uri=SH.group, name="slot_group", curie=SH.curie('group'), model_uri=LINKML.slot_group, domain=SlotDefinition, range=Optional[Union[str, SlotDefinitionName]]) @@ -5148,100 +5146,100 @@ class slots: model_uri=LINKML.schema_definition_name, domain=SchemaDefinition, range=Union[str, SchemaDefinitionName]) slots.type_expression_any_of = Slot(uri=LINKML.any_of, name="type_expression_any_of", curie=LINKML.curie('any_of'), - model_uri=LINKML.type_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]]) + model_uri=LINKML.type_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]]) slots.type_expression_all_of = Slot(uri=LINKML.all_of, name="type_expression_all_of", curie=LINKML.curie('all_of'), - model_uri=LINKML.type_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]]) + model_uri=LINKML.type_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]]) slots.type_expression_exactly_one_of = Slot(uri=LINKML.exactly_one_of, name="type_expression_exactly_one_of", curie=LINKML.curie('exactly_one_of'), - model_uri=LINKML.type_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]]) + model_uri=LINKML.type_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]]) slots.type_expression_none_of = Slot(uri=LINKML.none_of, name="type_expression_none_of", curie=LINKML.curie('none_of'), - model_uri=LINKML.type_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], List[Union[dict, "AnonymousTypeExpression"]]]]) + model_uri=LINKML.type_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousTypeExpression"], list[Union[dict, "AnonymousTypeExpression"]]]]) slots.type_definition_union_of = Slot(uri=LINKML.union_of, name="type_definition_union_of", curie=LINKML.curie('union_of'), - model_uri=LINKML.type_definition_union_of, domain=TypeDefinition, range=Optional[Union[Union[str, TypeDefinitionName], List[Union[str, TypeDefinitionName]]]]) + model_uri=LINKML.type_definition_union_of, domain=TypeDefinition, range=Optional[Union[Union[str, TypeDefinitionName], list[Union[str, TypeDefinitionName]]]]) slots.enum_binding_range = Slot(uri=LINKML.range, name="enum_binding_range", curie=LINKML.curie('range'), model_uri=LINKML.enum_binding_range, domain=EnumBinding, range=Optional[Union[str, EnumDefinitionName]]) slots.structured_alias_categories = Slot(uri=DCTERMS.subject, name="structured_alias_categories", curie=DCTERMS.curie('subject'), - model_uri=LINKML.structured_alias_categories, domain=StructuredAlias, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + model_uri=LINKML.structured_alias_categories, domain=StructuredAlias, range=Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]]) slots.path_expression_followed_by = Slot(uri=LINKML.followed_by, name="path_expression_followed_by", curie=LINKML.curie('followed_by'), model_uri=LINKML.path_expression_followed_by, domain=PathExpression, range=Optional[Union[dict, "PathExpression"]]) slots.path_expression_any_of = Slot(uri=LINKML.any_of, name="path_expression_any_of", curie=LINKML.curie('any_of'), - model_uri=LINKML.path_expression_any_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]]) + model_uri=LINKML.path_expression_any_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]]) slots.path_expression_exactly_one_of = Slot(uri=LINKML.exactly_one_of, name="path_expression_exactly_one_of", curie=LINKML.curie('exactly_one_of'), - model_uri=LINKML.path_expression_exactly_one_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]]) + model_uri=LINKML.path_expression_exactly_one_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]]) slots.path_expression_none_of = Slot(uri=LINKML.none_of, name="path_expression_none_of", curie=LINKML.curie('none_of'), - model_uri=LINKML.path_expression_none_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]]) + model_uri=LINKML.path_expression_none_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]]) slots.path_expression_all_of = Slot(uri=LINKML.all_of, name="path_expression_all_of", curie=LINKML.curie('all_of'), - model_uri=LINKML.path_expression_all_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], List[Union[dict, "PathExpression"]]]]) + model_uri=LINKML.path_expression_all_of, domain=PathExpression, range=Optional[Union[Union[dict, "PathExpression"], list[Union[dict, "PathExpression"]]]]) slots.slot_expression_any_of = Slot(uri=LINKML.any_of, name="slot_expression_any_of", curie=LINKML.curie('any_of'), - model_uri=LINKML.slot_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]]) + model_uri=LINKML.slot_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]]) slots.slot_expression_all_of = Slot(uri=LINKML.all_of, name="slot_expression_all_of", curie=LINKML.curie('all_of'), - model_uri=LINKML.slot_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]]) + model_uri=LINKML.slot_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]]) slots.slot_expression_exactly_one_of = Slot(uri=LINKML.exactly_one_of, name="slot_expression_exactly_one_of", curie=LINKML.curie('exactly_one_of'), - model_uri=LINKML.slot_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]]) + model_uri=LINKML.slot_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]]) slots.slot_expression_none_of = Slot(uri=LINKML.none_of, name="slot_expression_none_of", curie=LINKML.curie('none_of'), - model_uri=LINKML.slot_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], List[Union[dict, "AnonymousSlotExpression"]]]]) + model_uri=LINKML.slot_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousSlotExpression"], list[Union[dict, "AnonymousSlotExpression"]]]]) slots.slot_definition_is_a = Slot(uri=LINKML.is_a, name="slot_definition_is_a", curie=LINKML.curie('is_a'), model_uri=LINKML.slot_definition_is_a, domain=SlotDefinition, range=Optional[Union[str, SlotDefinitionName]]) slots.slot_definition_mixins = Slot(uri=LINKML.mixins, name="slot_definition_mixins", curie=LINKML.curie('mixins'), - model_uri=LINKML.slot_definition_mixins, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.slot_definition_mixins, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.slot_definition_apply_to = Slot(uri=LINKML.apply_to, name="slot_definition_apply_to", curie=LINKML.curie('apply_to'), - model_uri=LINKML.slot_definition_apply_to, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.slot_definition_apply_to, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.slot_definition_disjoint_with = Slot(uri=LINKML.disjoint_with, name="slot_definition_disjoint_with", curie=LINKML.curie('disjoint_with'), - model_uri=LINKML.slot_definition_disjoint_with, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.slot_definition_disjoint_with, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.slot_definition_union_of = Slot(uri=LINKML.union_of, name="slot_definition_union_of", curie=LINKML.curie('union_of'), - model_uri=LINKML.slot_definition_union_of, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], List[Union[str, SlotDefinitionName]]]]) + model_uri=LINKML.slot_definition_union_of, domain=SlotDefinition, range=Optional[Union[Union[str, SlotDefinitionName], list[Union[str, SlotDefinitionName]]]]) slots.class_expression_any_of = Slot(uri=LINKML.any_of, name="class_expression_any_of", curie=LINKML.curie('any_of'), - model_uri=LINKML.class_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]]) + model_uri=LINKML.class_expression_any_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]]) slots.class_expression_all_of = Slot(uri=LINKML.all_of, name="class_expression_all_of", curie=LINKML.curie('all_of'), - model_uri=LINKML.class_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]]) + model_uri=LINKML.class_expression_all_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]]) slots.class_expression_exactly_one_of = Slot(uri=LINKML.exactly_one_of, name="class_expression_exactly_one_of", curie=LINKML.curie('exactly_one_of'), - model_uri=LINKML.class_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]]) + model_uri=LINKML.class_expression_exactly_one_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]]) slots.class_expression_none_of = Slot(uri=LINKML.none_of, name="class_expression_none_of", curie=LINKML.curie('none_of'), - model_uri=LINKML.class_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], List[Union[dict, "AnonymousClassExpression"]]]]) + model_uri=LINKML.class_expression_none_of, domain=None, range=Optional[Union[Union[dict, "AnonymousClassExpression"], list[Union[dict, "AnonymousClassExpression"]]]]) slots.class_definition_is_a = Slot(uri=LINKML.is_a, name="class_definition_is_a", curie=LINKML.curie('is_a'), model_uri=LINKML.class_definition_is_a, domain=ClassDefinition, range=Optional[Union[str, ClassDefinitionName]]) slots.class_definition_mixins = Slot(uri=LINKML.mixins, name="class_definition_mixins", curie=LINKML.curie('mixins'), - model_uri=LINKML.class_definition_mixins, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]]) + model_uri=LINKML.class_definition_mixins, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]]) slots.class_definition_apply_to = Slot(uri=LINKML.apply_to, name="class_definition_apply_to", curie=LINKML.curie('apply_to'), - model_uri=LINKML.class_definition_apply_to, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]]) + model_uri=LINKML.class_definition_apply_to, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]]) slots.class_definition_rules = Slot(uri=SH.rule, name="class_definition_rules", curie=SH.curie('rule'), - model_uri=LINKML.class_definition_rules, domain=ClassDefinition, range=Optional[Union[Union[dict, "ClassRule"], List[Union[dict, "ClassRule"]]]]) + model_uri=LINKML.class_definition_rules, domain=ClassDefinition, range=Optional[Union[Union[dict, "ClassRule"], list[Union[dict, "ClassRule"]]]]) slots.class_definition_disjoint_with = Slot(uri=LINKML.disjoint_with, name="class_definition_disjoint_with", curie=LINKML.curie('disjoint_with'), - model_uri=LINKML.class_definition_disjoint_with, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]]) + model_uri=LINKML.class_definition_disjoint_with, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]]) slots.class_definition_union_of = Slot(uri=LINKML.union_of, name="class_definition_union_of", curie=LINKML.curie('union_of'), - model_uri=LINKML.class_definition_union_of, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], List[Union[str, ClassDefinitionName]]]]) + model_uri=LINKML.class_definition_union_of, domain=ClassDefinition, range=Optional[Union[Union[str, ClassDefinitionName], list[Union[str, ClassDefinitionName]]]]) slots.permissible_value_is_a = Slot(uri=LINKML.is_a, name="permissible_value_is_a", curie=LINKML.curie('is_a'), model_uri=LINKML.permissible_value_is_a, domain=PermissibleValue, range=Optional[Union[str, PermissibleValueText]]) slots.permissible_value_mixins = Slot(uri=LINKML.mixins, name="permissible_value_mixins", curie=LINKML.curie('mixins'), - model_uri=LINKML.permissible_value_mixins, domain=PermissibleValue, range=Optional[Union[Union[str, PermissibleValueText], List[Union[str, PermissibleValueText]]]]) + model_uri=LINKML.permissible_value_mixins, domain=PermissibleValue, range=Optional[Union[Union[str, PermissibleValueText], list[Union[str, PermissibleValueText]]]]) diff --git a/linkml_runtime/linkml_model/types.py b/linkml_runtime/linkml_model/types.py index b7034f6f..ba0a7bc2 100644 --- a/linkml_runtime/linkml_model/types.py +++ b/linkml_runtime/linkml_model/types.py @@ -7,18 +7,8 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any -from dataclasses import dataclass - -from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int + from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import Bool, Curie, Decimal, ElementIdentifier, NCName, NodeIdentifier, URI, URIorCURIE, XSDDate, XSDDateTime, XSDTime diff --git a/linkml_runtime/linkml_model/units.py b/linkml_runtime/linkml_model/units.py index 88f68a31..c31b1d95 100644 --- a/linkml_runtime/linkml_model/units.py +++ b/linkml_runtime/linkml_model/units.py @@ -7,20 +7,15 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from .types import String, Uriorcurie from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" @@ -53,7 +48,7 @@ class UnitOfMeasure(YAMLRoot): A unit of measure, or unit, is a particular quantity value that has been chosen as a scale for measuring other quantities the same kind (more generally of equivalent dimension). """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = QUDT["Unit"] class_class_curie: ClassVar[str] = "qudt:Unit" @@ -63,13 +58,13 @@ class UnitOfMeasure(YAMLRoot): symbol: Optional[str] = None abbreviation: Optional[str] = None descriptive_name: Optional[str] = None - exact_mappings: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + exact_mappings: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() ucum_code: Optional[str] = None derivation: Optional[str] = None has_quantity_kind: Optional[Union[str, URIorCURIE]] = None iec61360code: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.symbol is not None and not isinstance(self.symbol, str): self.symbol = str(self.symbol) diff --git a/linkml_runtime/linkml_model/validation.py b/linkml_runtime/linkml_model/validation.py index 222f1511..ee4615c1 100644 --- a/linkml_runtime/linkml_model/validation.py +++ b/linkml_runtime/linkml_model/validation.py @@ -7,20 +7,17 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from .types import Nodeidentifier, String from linkml_runtime.utils.metamodelcore import NodeIdentifier metamodel_version = "1.7.0" @@ -54,16 +51,16 @@ class ValidationReport(YAMLRoot): """ A report object """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SH["ValidationReport"] class_class_curie: ClassVar[str] = "sh:ValidationReport" class_name: ClassVar[str] = "ValidationReport" class_model_uri: ClassVar[URIRef] = REPORTING.ValidationReport - results: Optional[Union[Union[dict, "ValidationResult"], List[Union[dict, "ValidationResult"]]]] = empty_list() + results: Optional[Union[Union[dict, "ValidationResult"], list[Union[dict, "ValidationResult"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.results, list): self.results = [self.results] if self.results is not None else [] self.results = [v if isinstance(v, ValidationResult) else ValidationResult(**as_dict(v)) for v in self.results] @@ -76,7 +73,7 @@ class ValidationResult(YAMLRoot): """ An individual result arising from validation of a data instance using a particular rule """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SH["ValidationResult"] class_class_curie: ClassVar[str] = "sh:ValidationResult" @@ -93,7 +90,7 @@ class ValidationResult(YAMLRoot): node_source: Optional[Union[str, NodeIdentifier]] = None info: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.type is not None and not isinstance(self.type, NodeIdentifier): self.type = NodeIdentifier(self.type) @@ -199,4 +196,4 @@ class slots: model_uri=REPORTING.info, domain=None, range=Optional[str]) slots.validationReport__results = Slot(uri=REPORTING.results, name="validationReport__results", curie=REPORTING.curie('results'), - model_uri=REPORTING.validationReport__results, domain=None, range=Optional[Union[Union[dict, ValidationResult], List[Union[dict, ValidationResult]]]]) + model_uri=REPORTING.validationReport__results, domain=None, range=Optional[Union[Union[dict, ValidationResult], list[Union[dict, ValidationResult]]]]) diff --git a/linkml_runtime/loaders/context_flattener.py b/linkml_runtime/loaders/context_flattener.py index 0462a6bf..dbcc814c 100644 --- a/linkml_runtime/loaders/context_flattener.py +++ b/linkml_runtime/loaders/context_flattener.py @@ -1,11 +1,11 @@ import json import os -from typing import List, Optional, Union +from typing import Optional, Union -def flatten_dict(ctxt: str, base: str, seen: Optional[List[str]] = None) -> dict: +def flatten_dict(ctxt: str, base: str, seen: Optional[list[str]] = None) -> dict: - def map_context(ctxt_ent: Union[str, dict, list], seen: List[str]) -> Union[dict, list]: + def map_context(ctxt_ent: Union[str, dict, list], seen: list[str]) -> Union[dict, list]: if isinstance(ctxt_ent, str): ent_dict = flatten_dict(ctxt_ent, base, seen) return ent_dict['@context'] if '@context' in ent_dict else ent_dict @@ -14,7 +14,7 @@ def map_context(ctxt_ent: Union[str, dict, list], seen: List[str]) -> Union[dict else: return map_dict(ctxt_ent, seen) - def map_dict(inp: dict, seen: List[str]) -> dict: + def map_dict(inp: dict, seen: list[str]) -> dict: rval = dict() for k, v in inp.items(): if k == '@context': diff --git a/linkml_runtime/loaders/delimited_file_loader.py b/linkml_runtime/loaders/delimited_file_loader.py index d5c48110..a3d965d1 100644 --- a/linkml_runtime/loaders/delimited_file_loader.py +++ b/linkml_runtime/loaders/delimited_file_loader.py @@ -1,13 +1,13 @@ from abc import ABC, abstractmethod -from json_flattener import unflatten_from_csv, KeyConfig, GlobalConfig, Serializer +from json_flattener import unflatten_from_csv, GlobalConfig import json -from typing import Type, Union, List +from typing import Union from linkml_runtime.utils.yamlutils import YAMLRoot from pydantic import BaseModel from linkml_runtime.loaders.loader_root import Loader from linkml_runtime.loaders.json_loader import JSONLoader -from linkml_runtime.linkml_model.meta import SlotDefinitionName, SchemaDefinition, ClassDefinition +from linkml_runtime.linkml_model.meta import SlotDefinitionName, SchemaDefinition from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.schemaview import SchemaView from linkml_runtime.utils.csvutils import get_configmap @@ -24,15 +24,15 @@ def load_as_dict(self, index_slot: SlotDefinitionName = None, schema: SchemaDefinition = None, schemaview: SchemaView = None, - **kwargs) -> Union[dict, List[dict]]: + **kwargs) -> Union[dict, list[dict]]: json_str = self._get_json_str_to_load(source, index_slot, schema, schemaview, **kwargs) return JSONLoader().load_as_dict(json_str) - def load_any(self, *args, **kwargs) -> Union[YAMLRoot, List[YAMLRoot]]: + def load_any(self, *args, **kwargs) -> Union[YAMLRoot, list[YAMLRoot]]: return self.load(*args, **kwargs) def loads(self, input, - target_class: Type[Union[BaseModel, YAMLRoot]], + target_class: type[Union[BaseModel, YAMLRoot]], index_slot: SlotDefinitionName = None, schema: SchemaDefinition = None, schemaview: SchemaView = None, @@ -41,7 +41,7 @@ def loads(self, input, return JSONLoader().loads(json_str, target_class=target_class) def load(self, source: str, - target_class: Type[Union[BaseModel, YAMLRoot]], + target_class: type[Union[BaseModel, YAMLRoot]], index_slot: SlotDefinitionName = None, schema: SchemaDefinition = None, schemaview: SchemaView = None, diff --git a/linkml_runtime/loaders/json_loader.py b/linkml_runtime/loaders/json_loader.py index 5d4d94cf..34f89991 100644 --- a/linkml_runtime/loaders/json_loader.py +++ b/linkml_runtime/loaders/json_loader.py @@ -1,6 +1,6 @@ import json import logging -from typing import Union, TextIO, Optional, Dict, Type, List +from typing import Union, TextIO, Optional from hbreader import FileInfo @@ -17,18 +17,18 @@ def load_as_dict(self, source: Union[str, dict, TextIO], *, base_dir: Optional[str] = None, - metadata: Optional[FileInfo] = None) -> Union[dict, List[dict]]: + metadata: Optional[FileInfo] = None) -> Union[dict, list[dict]]: data = self._read_source(source, base_dir=base_dir, metadata=metadata, accept_header="application/ld+json, application/json, text/json") data_as_dict = json.loads(data) if isinstance(data, str) else data return self.json_clean(data_as_dict) def load_any(self, source: Union[str, dict, TextIO], - target_class: Type[Union[BaseModel, YAMLRoot]], + target_class: type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, metadata: Optional[FileInfo] = None, - **_) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + **_) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: data_as_dict = self.load_as_dict(source, base_dir=base_dir, metadata=metadata) if isinstance(data_as_dict, dict): diff --git a/linkml_runtime/loaders/loader_root.py b/linkml_runtime/loaders/loader_root.py index e690c4b3..49e3fae2 100644 --- a/linkml_runtime/loaders/loader_root.py +++ b/linkml_runtime/loaders/loader_root.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from typing import TextIO, Union, Optional, Callable, Dict, Type, Any, List +from typing import TextIO, Union, Optional, Callable, Any from logging import getLogger from pydantic import BaseModel @@ -41,10 +41,10 @@ def _is_empty(o) -> bool: def load_source(self, source: Union[str, dict, TextIO], - loader: Callable[[Union[str, Dict], FileInfo], Optional[Union[Dict, List]]], - target_class: Union[Type[YAMLRoot], Type[BaseModel]], + loader: Callable[[Union[str, dict], FileInfo], Optional[Union[dict, list]]], + target_class: Union[type[YAMLRoot], type[BaseModel]], accept_header: Optional[str] = "text/plain, application/yaml;q=0.9", - metadata: Optional[FileInfo] = None) -> Optional[Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]]: + metadata: Optional[FileInfo] = None) -> Optional[Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]]: """ Base loader - convert a file, url, string, open file handle or dictionary into an instance of target_class @@ -79,12 +79,12 @@ def load(self, *args, **kwargs) -> Union[BaseModel, YAMLRoot]: else: raise ValueError(f'Result is not an instance of BaseModel or YAMLRoot: {type(results)}') - def load_as_dict(self, *args, **kwargs) -> Union[dict, List[dict]]: + def load_as_dict(self, *args, **kwargs) -> Union[dict, list[dict]]: raise NotImplementedError() @abstractmethod - def load_any(self, source: Union[str, dict, TextIO], target_class: Type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, - metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + def load_any(self, source: Union[str, dict, TextIO], target_class: type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, + metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: """ Load source as an instance of target_class, or list of instances of target_class @@ -97,7 +97,7 @@ def load_any(self, source: Union[str, dict, TextIO], target_class: Type[Union[Ba """ raise NotImplementedError() - def loads_any(self, source: str, target_class: Type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + def loads_any(self, source: str, target_class: type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: """ Load source as a string as an instance of target_class, or list of instances of target_class @param source: source @@ -108,7 +108,7 @@ def loads_any(self, source: str, target_class: Type[Union[BaseModel, YAMLRoot]], """ return self.load_any(source, target_class, metadata=metadata) - def loads(self, source: str, target_class: Type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot]: + def loads(self, source: str, target_class: type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot]: """ Load source as a string :param source: source @@ -120,8 +120,8 @@ def loads(self, source: str, target_class: Type[Union[BaseModel, YAMLRoot]], *, return self.load(source, target_class, metadata=metadata) def _construct_target_class(self, - data_as_dict: Union[dict, List[dict]], - target_class: Union[Type[YAMLRoot], Type[BaseModel]]) -> Optional[Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]]: + data_as_dict: Union[dict, list[dict]], + target_class: Union[type[YAMLRoot], type[BaseModel]]) -> Optional[Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]]: if data_as_dict: if isinstance(data_as_dict, list): if issubclass(target_class, YAMLRoot): diff --git a/linkml_runtime/loaders/rdf_loader.py b/linkml_runtime/loaders/rdf_loader.py index abaa8a79..69dea78a 100644 --- a/linkml_runtime/loaders/rdf_loader.py +++ b/linkml_runtime/loaders/rdf_loader.py @@ -1,4 +1,4 @@ -from typing import Union, TextIO, Optional, Type, List +from typing import Union, TextIO, Optional from hbreader import FileInfo @@ -16,11 +16,11 @@ class RDFLoader(Loader): - def load_any(self, *args, **kwargs) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + def load_any(self, *args, **kwargs) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: return self.load(*args, **kwargs) - def load(self, source: Union[str, TextIO, Graph], target_class: Type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, + def load(self, source: Union[str, TextIO, Graph], target_class: type[Union[BaseModel, YAMLRoot]], *, base_dir: Optional[str] = None, contexts: CONTEXTS_PARAM_TYPE = None, fmt: Optional[str] = 'turtle', metadata: Optional[FileInfo] = None) -> Union[BaseModel, YAMLRoot]: """ diff --git a/linkml_runtime/loaders/rdflib_loader.py b/linkml_runtime/loaders/rdflib_loader.py index 84e98d61..758d13e9 100644 --- a/linkml_runtime/loaders/rdflib_loader.py +++ b/linkml_runtime/loaders/rdflib_loader.py @@ -2,12 +2,12 @@ import urllib from copy import copy from dataclasses import dataclass -from typing import Optional, Any, Dict, Type, Union, TextIO, List, Tuple, Set +from typing import Optional, Any, Union, TextIO from curies import Converter from hbreader import FileInfo from rdflib import Graph, URIRef -from rdflib.term import Node, BNode, Literal +from rdflib.term import BNode, Literal from rdflib.namespace import RDF from linkml_runtime import MappingError, DataNotFoundError @@ -22,7 +22,7 @@ VALID_SUBJECT = Union[URIRef, BNode] -ANYDICT = Dict[str, Any] +ANYDICT = dict[str, Any] @dataclass class Pointer: @@ -37,12 +37,12 @@ class RDFLibLoader(Loader): def from_rdf_graph( self, graph: Graph, schemaview: SchemaView, - target_class: Type[Union[BaseModel, YAMLRoot]], - prefix_map: Union[Dict[str, str], Converter, None] = None, + target_class: type[Union[BaseModel, YAMLRoot]], + prefix_map: Union[dict[str, str], Converter, None] = None, cast_literals: bool = True, allow_unprocessed_triples: bool = True, ignore_unmapped_predicates: bool = False, - ) -> List[Union[BaseModel, YAMLRoot]]: + ) -> list[Union[BaseModel, YAMLRoot]]: """ Loads objects from graph into lists of the python target_class structure, recursively walking RDF graph from instances of target_class. @@ -75,20 +75,20 @@ def from_rdf_graph( graph.namespace_manager.bind(k, URIRef(v)) # Step 1: Create stub root dict-objects target_class_uriref: URIRef = target_class.class_class_uri - root_dicts: List[ANYDICT] = [] - root_subjects: List[VALID_SUBJECT] = list(graph.subjects(RDF.type, target_class_uriref)) + root_dicts: list[ANYDICT] = [] + root_subjects: list[VALID_SUBJECT] = list(graph.subjects(RDF.type, target_class_uriref)) logger.debug(f'ROOTS = {root_subjects}') # Step 2: walk RDF graph starting from root subjects, constructing dict tree - node_tuples_to_visit: List[Tuple[VALID_SUBJECT, ClassDefinitionName]] ## nodes and their type still to visit + node_tuples_to_visit: list[tuple[VALID_SUBJECT, ClassDefinitionName]] ## nodes and their type still to visit node_tuples_to_visit = [(subject, target_class.class_name) for subject in root_subjects] - uri_to_slot: Dict[str, SlotDefinition] ## lookup table for RDF predicates -> slots + uri_to_slot: dict[str, SlotDefinition] ## lookup table for RDF predicates -> slots uri_to_slot = {URIRef(schemaview.get_uri(s, expand=True)): s for s in schemaview.all_slots().values()} - processed: Set[VALID_SUBJECT] = set() ## track nodes already visited, or already scheduled + processed: set[VALID_SUBJECT] = set() ## track nodes already visited, or already scheduled for n, _ in node_tuples_to_visit: processed.add(n) - obj_map: Dict[VALID_SUBJECT, ANYDICT] = {} ## map from an RDF node to its dict representation + obj_map: dict[VALID_SUBJECT, ANYDICT] = {} ## map from an RDF node to its dict representation unmapped_predicates = set() - processed_triples: Set[Tuple] = set() + processed_triples: set[tuple] = set() while len(node_tuples_to_visit) > 0: subject, subject_class = node_tuples_to_visit.pop() processed.add(subject) @@ -195,7 +195,7 @@ def repl(v): return v2 else: return v - objs_to_visit: List[ANYDICT] = copy(root_dicts) + objs_to_visit: list[ANYDICT] = copy(root_dicts) while len(objs_to_visit) > 0: obj = objs_to_visit.pop() logger.debug(f'Replacing pointers for {obj}') @@ -238,9 +238,9 @@ def _uri_to_id(self, node: VALID_SUBJECT, id_slot: SlotDefinition, schemaview: S def load( self, source: Union[str, TextIO, Graph], - target_class: Type[Union[BaseModel, YAMLRoot]], *, + target_class: type[Union[BaseModel, YAMLRoot]], *, schemaview: SchemaView = None, - prefix_map: Union[Dict[str, str], Converter, None] = None, + prefix_map: Union[dict[str, str], Converter, None] = None, fmt: Optional[str] = 'turtle', metadata: Optional[FileInfo] = None, **kwargs, @@ -276,7 +276,7 @@ def load( def loads(self, source: str, **kwargs) -> Union[BaseModel, YAMLRoot]: return self.load(source, **kwargs) - def load_any(self, source: str, **kwargs) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + def load_any(self, source: str, **kwargs) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: return self.load(source, **kwargs) diff --git a/linkml_runtime/loaders/yaml_loader.py b/linkml_runtime/loaders/yaml_loader.py index eee6e973..fa33a280 100644 --- a/linkml_runtime/loaders/yaml_loader.py +++ b/linkml_runtime/loaders/yaml_loader.py @@ -1,6 +1,6 @@ import os from io import StringIO -from typing import Union, TextIO, Optional, Dict, Type, List +from typing import Union, TextIO, Optional import yaml from hbreader import FileInfo @@ -19,7 +19,7 @@ def load_as_dict(self, source: Union[str, dict, TextIO], *, base_dir: Optional[str] = None, - metadata: Optional[FileInfo] = None) -> Union[dict, List[dict]]: + metadata: Optional[FileInfo] = None) -> Union[dict, list[dict]]: if metadata is None: metadata = FileInfo() if base_dir and not metadata.base_path: @@ -35,13 +35,13 @@ def load_as_dict(self, def load_any(self, source: Union[str, dict, TextIO], - target_class: Union[Type[YAMLRoot], Type[BaseModel]], + target_class: Union[type[YAMLRoot], type[BaseModel]], *, base_dir: Optional[str] = None, - metadata: Optional[FileInfo] = None, **_) -> Union[YAMLRoot, List[YAMLRoot]]: + metadata: Optional[FileInfo] = None, **_) -> Union[YAMLRoot, list[YAMLRoot]]: data_as_dict = self.load_as_dict(source, base_dir=base_dir, metadata=metadata) return self._construct_target_class(data_as_dict, target_class) - def loads_any(self, source: str, target_class: Type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, List[BaseModel], List[YAMLRoot]]: + def loads_any(self, source: str, target_class: type[Union[BaseModel, YAMLRoot]], *, metadata: Optional[FileInfo] = None, **_) -> Union[BaseModel, YAMLRoot, list[BaseModel], list[YAMLRoot]]: """ Load source as a string @param source: source diff --git a/linkml_runtime/processing/referencevalidator.py b/linkml_runtime/processing/referencevalidator.py index d01764ba..a167f634 100644 --- a/linkml_runtime/processing/referencevalidator.py +++ b/linkml_runtime/processing/referencevalidator.py @@ -13,7 +13,8 @@ import datetime from decimal import Decimal from enum import Enum -from typing import Any, Optional, List, Tuple, Union, Iterator, TextIO +from typing import Any, Optional, Union, TextIO +from collections.abc import Iterator import click import yaml @@ -93,7 +94,7 @@ def _is_list_of_lists(x: Any) -> bool: return x and isinstance(x, list) and isinstance(x[0], list) -def linearize_nested_lists(nested_list: List, is_row_ordered=True): +def linearize_nested_lists(nested_list: list, is_row_ordered=True): """ Returns a linear sequence of elements corresponding to a nested list array representation @@ -151,7 +152,7 @@ class CollectionForm(Enum): ListOfLists = "ListOfLists" -COLLECTION_FORM_NORMALIZATION = Tuple[CollectionForm, CollectionForm] +COLLECTION_FORM_NORMALIZATION = tuple[CollectionForm, CollectionForm] COLLECTION_FORM_ANNOTATION_KEY = "collection_form" @@ -180,10 +181,10 @@ class Report: configuration: ValidationConfiguration = None """Customization of reporting.""" - results: List[ValidationResult] = field(default_factory=lambda: []) + results: list[ValidationResult] = field(default_factory=lambda: []) """All results, including normalized""" - normalizations: List[Normalization] = field(default_factory=lambda: []) + normalizations: list[Normalization] = field(default_factory=lambda: []) """All normalizations and repairs applied""" def combine(self, other: "Report") -> "Report": @@ -250,32 +251,32 @@ def add_problem( def _is_error(self, result: ValidationResult) -> bool: return result.type != ConstraintType(ConstraintType.RecommendedConstraint) - def errors(self) -> List[ValidationResult]: + def errors(self) -> list[ValidationResult]: """ Return a list of all results that are not normalized and do not have ERROR severity """ # TODO: use severity return [r for r in self.results_excluding_normalized() if self._is_error(r)] - def warnings(self) -> List[ValidationResult]: + def warnings(self) -> list[ValidationResult]: """ Return a list of all results that are not normalized and do not have ERROR severity """ # TODO: use severity return [r for r in self.results_excluding_normalized() if not self._is_error(r)] - def results_excluding_normalized(self) -> List[ValidationResult]: + def results_excluding_normalized(self) -> list[ValidationResult]: return [r for r in self.results if not r.normalized] - def unrepaired_problem_types(self) -> List[ConstraintType]: + def unrepaired_problem_types(self) -> list[ConstraintType]: return [r.type for r in self.results_excluding_normalized()] - def normalized_results(self) -> List[ValidationResult]: + def normalized_results(self) -> list[ValidationResult]: return [r for r in self.results if r.normalized] def collection_form_normalizations( self, - ) -> Iterator[Tuple[CollectionForm, CollectionForm]]: + ) -> Iterator[tuple[CollectionForm, CollectionForm]]: for norm in self.normalizations: if isinstance(norm, CollectionFormNormalization): yield norm.input_form, norm.output_form diff --git a/linkml_runtime/processing/validation_datamodel.py b/linkml_runtime/processing/validation_datamodel.py index 035835c3..a65b7f29 100644 --- a/linkml_runtime/processing/validation_datamodel.py +++ b/linkml_runtime/processing/validation_datamodel.py @@ -7,33 +7,25 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.linkml_model.meta import ( EnumDefinition, PermissibleValue, - PvFormulaOptions, ) from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import ( YAMLRoot, - extended_str, - extended_float, - extended_int, ) from linkml_runtime.utils.dataclass_extensions_376 import ( dataclasses_init_fn_with_kwargs, ) -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Boolean, Integer, String, Uriorcurie from linkml_runtime.utils.metamodelcore import Bool, URIorCURIE metamodel_version = "1.7.0" @@ -73,7 +65,7 @@ class TypeSeverityKeyValueType(URIorCURIE): @dataclass class ConstraintCheck(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.ConstraintCheck class_class_curie: ClassVar[str] = "vm:ConstraintCheck" @@ -82,7 +74,7 @@ class ConstraintCheck(YAMLRoot): id: Union[str, ConstraintCheckId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ConstraintCheckId): @@ -93,7 +85,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Node(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.Node class_class_curie: ClassVar[str] = "vm:Node" @@ -102,7 +94,7 @@ class Node(YAMLRoot): id: Union[str, NodeId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, NodeId): @@ -117,7 +109,7 @@ class ValidationConfiguration(YAMLRoot): Configuration parameters for execution of a validation report """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.ValidationConfiguration class_class_curie: ClassVar[str] = "vm:ValidationConfiguration" @@ -127,15 +119,15 @@ class ValidationConfiguration(YAMLRoot): max_number_results_per_type: Optional[int] = None type_severity_map: Optional[ Union[ - Dict[ + dict[ Union[str, TypeSeverityKeyValueType], Union[dict, "TypeSeverityKeyValue"], ], - List[Union[dict, "TypeSeverityKeyValue"]], + list[Union[dict, "TypeSeverityKeyValue"]], ] ] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.max_number_results_per_type is not None and not isinstance( self.max_number_results_per_type, int ): @@ -157,7 +149,7 @@ class RepairConfiguration(YAMLRoot): Configuration parameters for execution of validation repairs """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.RepairConfiguration class_class_curie: ClassVar[str] = "vm:RepairConfiguration" @@ -167,7 +159,7 @@ class RepairConfiguration(YAMLRoot): validation_configuration: Optional[Union[dict, ValidationConfiguration]] = None dry_run: Optional[Union[bool, Bool]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.validation_configuration is not None and not isinstance( self.validation_configuration, ValidationConfiguration ): @@ -187,7 +179,7 @@ class TypeSeverityKeyValue(YAMLRoot): key-value pair that maps a validation result type to a severity setting, for overriding default severity """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.TypeSeverityKeyValue class_class_curie: ClassVar[str] = "vm:TypeSeverityKeyValue" @@ -197,7 +189,7 @@ class TypeSeverityKeyValue(YAMLRoot): type: Union[str, TypeSeverityKeyValueType] = None severity: Optional[Union[str, "SeverityType"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.type): self.MissingRequiredField("type") if not isinstance(self.type, TypeSeverityKeyValueType): @@ -215,7 +207,7 @@ class Report(YAMLRoot): A report object that is a holder to multiple report results """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.Report class_class_curie: ClassVar[str] = "vm:Report" @@ -223,10 +215,10 @@ class Report(YAMLRoot): class_model_uri: ClassVar[URIRef] = VM.Report results: Optional[ - Union[Union[dict, "Result"], List[Union[dict, "Result"]]] + Union[Union[dict, "Result"], list[Union[dict, "Result"]]] ] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.results, list): self.results = [self.results] if self.results is not None else [] self.results = [ @@ -242,7 +234,7 @@ class ValidationReport(Report): A report that consists of validation results """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SH.ValidationReport class_class_curie: ClassVar[str] = "sh:ValidationReport" @@ -250,10 +242,10 @@ class ValidationReport(Report): class_model_uri: ClassVar[URIRef] = VM.ValidationReport results: Optional[ - Union[Union[dict, "ValidationResult"], List[Union[dict, "ValidationResult"]]] + Union[Union[dict, "ValidationResult"], list[Union[dict, "ValidationResult"]]] ] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.results, list): self.results = [self.results] if self.results is not None else [] self.results = [ @@ -270,7 +262,7 @@ class RepairReport(Report): A report that consists of repair operation results """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.RepairReport class_class_curie: ClassVar[str] = "vm:RepairReport" @@ -278,10 +270,10 @@ class RepairReport(Report): class_model_uri: ClassVar[URIRef] = VM.RepairReport results: Optional[ - Union[Union[dict, "RepairOperation"], List[Union[dict, "RepairOperation"]]] + Union[Union[dict, "RepairOperation"], list[Union[dict, "RepairOperation"]]] ] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.results, list): self.results = [self.results] if self.results is not None else [] self.results = [ @@ -297,7 +289,7 @@ class Result(YAMLRoot): Abstract base class for any individual report result """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.Result class_class_curie: ClassVar[str] = "vm:Result" @@ -311,7 +303,7 @@ class ValidationResult(Result): An individual result arising from validation of a data instance using a particular rule """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SH.ValidationResult class_class_curie: ClassVar[str] = "sh:ValidationResult" @@ -333,7 +325,7 @@ class ValidationResult(Result): source_column_number: Optional[int] = None source_location: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.type): self.MissingRequiredField("type") if not isinstance(self.type, ConstraintType): @@ -393,7 +385,7 @@ class RepairOperation(Result): The result of performing an individual repair """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VM.RepairOperation class_class_curie: ClassVar[str] = "vm:RepairOperation" @@ -405,7 +397,7 @@ class RepairOperation(Result): successful: Optional[Union[bool, Bool]] = None info: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.repairs is not None and not isinstance(self.repairs, ValidationResult): self.repairs = ValidationResult(**as_dict(self.repairs)) @@ -649,7 +641,7 @@ class slots: curie=SH.curie("result"), model_uri=VM.results, domain=None, - range=Optional[Union[Union[dict, Result], List[Union[dict, Result]]]], + range=Optional[Union[Union[dict, Result], list[Union[dict, Result]]]], ) slots.normalized = Slot( @@ -732,10 +724,10 @@ class slots: domain=None, range=Optional[ Union[ - Dict[ + dict[ Union[str, TypeSeverityKeyValueType], Union[dict, TypeSeverityKeyValue] ], - List[Union[dict, TypeSeverityKeyValue]], + list[Union[dict, TypeSeverityKeyValue]], ] ], ) @@ -819,7 +811,7 @@ class slots: model_uri=VM.ValidationReport_results, domain=ValidationReport, range=Optional[ - Union[Union[dict, "ValidationResult"], List[Union[dict, "ValidationResult"]]] + Union[Union[dict, "ValidationResult"], list[Union[dict, "ValidationResult"]]] ], ) @@ -830,6 +822,6 @@ class slots: model_uri=VM.RepairReport_results, domain=RepairReport, range=Optional[ - Union[Union[dict, "RepairOperation"], List[Union[dict, "RepairOperation"]]] + Union[Union[dict, "RepairOperation"], list[Union[dict, "RepairOperation"]]] ], ) diff --git a/linkml_runtime/utils/context_utils.py b/linkml_runtime/utils/context_utils.py index 1d28fe1b..922aaaf5 100644 --- a/linkml_runtime/utils/context_utils.py +++ b/linkml_runtime/utils/context_utils.py @@ -1,13 +1,13 @@ import json import os from io import TextIOWrapper -from typing import Optional, Union, List, Any, Dict, Callable +from typing import Optional, Union, Any, Callable import yaml from jsonasobj2 import JsonObj, loads CONTEXT_TYPE = Union[str, dict, JsonObj] -CONTEXTS_PARAM_TYPE = Optional[Union[CONTEXT_TYPE, List[CONTEXT_TYPE]]] +CONTEXTS_PARAM_TYPE = Optional[Union[CONTEXT_TYPE, list[CONTEXT_TYPE]]] def merge_contexts(contexts: CONTEXTS_PARAM_TYPE = None, base: Optional[Any] = None) -> JsonObj: @@ -50,7 +50,7 @@ def to_file_uri(fname: str) -> str: JsonObj(**{"@context": context_list[0] if len(context_list) == 1 else context_list}) -def map_import(importmap: Dict[str, str], namespaces: Callable[[None], "Namespaces"], imp: Any) -> str: +def map_import(importmap: dict[str, str], namespaces: Callable[[None], "Namespaces"], imp: Any) -> str: """ lookup an import in an importmap. @@ -77,8 +77,8 @@ def map_import(importmap: Dict[str, str], namespaces: Callable[[None], "Namespac return importmap.get(sname, sname) # It may also use URI or other forms -def parse_import_map(map_: Optional[Union[str, Dict[str, str], TextIOWrapper]], - base: Optional[str] = None) -> Dict[str, str]: +def parse_import_map(map_: Optional[Union[str, dict[str, str], TextIOWrapper]], + base: Optional[str] = None) -> dict[str, str]: """ Process the import map :param map_: A map location, the JSON for a map, YAML for a map or an existing dictionary diff --git a/linkml_runtime/utils/csvutils.py b/linkml_runtime/utils/csvutils.py index f233f2ae..7813f078 100644 --- a/linkml_runtime/utils/csvutils.py +++ b/linkml_runtime/utils/csvutils.py @@ -1,8 +1,7 @@ import logging -from json_flattener import KeyConfig, GlobalConfig, Serializer +from json_flattener import KeyConfig, Serializer from json_flattener.flattener import CONFIGMAP -from linkml_runtime.linkml_model.meta import SlotDefinitionName, SchemaDefinition, \ - SlotDefinition, ClassDefinition, ClassDefinitionName +from linkml_runtime.linkml_model.meta import SlotDefinitionName, ClassDefinitionName from linkml_runtime.utils.schemaview import SchemaView logger = logging.getLogger(__name__) diff --git a/linkml_runtime/utils/dictutils.py b/linkml_runtime/utils/dictutils.py index af77e4bd..06763832 100644 --- a/linkml_runtime/utils/dictutils.py +++ b/linkml_runtime/utils/dictutils.py @@ -1,10 +1,9 @@ import json -from typing import Dict from linkml_runtime.dumpers import json_dumper from linkml_runtime.utils.yamlutils import YAMLRoot -def as_simple_dict(element: YAMLRoot) -> Dict: +def as_simple_dict(element: YAMLRoot) -> dict: """ Returns the representation of element as a python dictionary diff --git a/linkml_runtime/utils/distroutils.py b/linkml_runtime/utils/distroutils.py index d7986fe4..60e7ce90 100644 --- a/linkml_runtime/utils/distroutils.py +++ b/linkml_runtime/utils/distroutils.py @@ -4,12 +4,11 @@ import logging import pkgutil from pathlib import PurePath -from typing import List, Type logger = logging.getLogger(__name__) -def get_default_paths(file_type: str) -> List[PurePath]: +def get_default_paths(file_type: str) -> list[PurePath]: """ Return candidate relative paths for a file type @@ -45,7 +44,7 @@ def get_default_paths(file_type: str) -> List[PurePath]: logger.debug(f"Paths to search: {paths}") return paths -def get_packaged_file_as_str(package: str, file_type: str, rel_paths: List[PurePath]=[], encoding="utf-8") -> str: +def get_packaged_file_as_str(package: str, file_type: str, rel_paths: list[PurePath]=[], encoding="utf-8") -> str: """ Retrieve the value of a data file distributed alongside a python package diff --git a/linkml_runtime/utils/enumerations.py b/linkml_runtime/utils/enumerations.py index 5cd06ed2..6b9cd047 100644 --- a/linkml_runtime/utils/enumerations.py +++ b/linkml_runtime/utils/enumerations.py @@ -1,5 +1,5 @@ from dataclasses import fields -from typing import Union, Optional, Type +from typing import Union, Optional from linkml_runtime.utils.metamodelcore import Curie from linkml_runtime.utils.yamlutils import YAMLRoot @@ -28,7 +28,7 @@ def __contains__(cls, item) -> bool: return item in cls.__dict__ -def isinstance_dt(cls: Type, inst: str) -> bool: +def isinstance_dt(cls: type, inst: str) -> bool: """ Duck typing isinstance to prevent recursion errors """ return inst in [c.__name__ for c in type(cls).mro()] diff --git a/linkml_runtime/utils/eval_utils.py b/linkml_runtime/utils/eval_utils.py index 962325f7..a7d28bfb 100644 --- a/linkml_runtime/utils/eval_utils.py +++ b/linkml_runtime/utils/eval_utils.py @@ -8,14 +8,14 @@ import operator as op # supported operators -from typing import Tuple, List, Any +from typing import Any operators = {ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, ast.Div: op.truediv, ast.Pow: op.pow, ast.BitXor: op.xor, ast.USub: op.neg} compare_operators = {ast.Eq: op.eq, ast.Lt: op.lt, ast.LtE: op.le, ast.Gt: op.gt, ast.GtE: op.ge} -def eval_conditional(*conds: List[Tuple[bool, Any]]) -> Any: +def eval_conditional(*conds: list[tuple[bool, Any]]) -> Any: """ Evaluate a collection of expression,value tuples, returing the first value whose expression is true diff --git a/linkml_runtime/utils/formatutils.py b/linkml_runtime/utils/formatutils.py index da77ba73..37e437d2 100644 --- a/linkml_runtime/utils/formatutils.py +++ b/linkml_runtime/utils/formatutils.py @@ -1,9 +1,8 @@ import re from decimal import Decimal -from numbers import Number -from typing import List, Any, Union +from typing import Any -from jsonasobj2 import JsonObj, as_dict, is_list, is_dict, items, as_json_obj +from jsonasobj2 import JsonObj, as_dict, is_list, is_dict, items ws_pattern = re.compile(r'\s+') us_pattern = re.compile(r'_+') @@ -69,7 +68,7 @@ def uri_for(prefix: str, suffix: str) -> str: return prefix + ':' + suffix -def split_line(txt: str, split_len: int = split_col) -> List[str]: +def split_line(txt: str, split_len: int = split_col) -> list[str]: # TODO: consider replacing by textwrap.fill function, but note that its behavior is a bit different out_lines = [] words = txt.split() diff --git a/linkml_runtime/utils/inference_utils.py b/linkml_runtime/utils/inference_utils.py index ea554529..c8545d78 100644 --- a/linkml_runtime/utils/inference_utils.py +++ b/linkml_runtime/utils/inference_utils.py @@ -1,7 +1,7 @@ import logging from dataclasses import field, dataclass from enum import Enum -from typing import Union, Optional, Any, Dict, Callable +from typing import Union, Optional, Any, Callable from jsonasobj2 import JsonObj, items from linkml_runtime import SchemaView @@ -16,7 +16,7 @@ RESOLVE_FUNC = Callable[[str, Any], Any] -def obj_as_dict_nonrecursive(obj: YAMLRoot, resolve_function: RESOLVE_FUNC = None) -> Dict[str, Any]: +def obj_as_dict_nonrecursive(obj: YAMLRoot, resolve_function: RESOLVE_FUNC = None) -> dict[str, Any]: """ Translates an object into a dict, for the purposes of input into formatted strings diff --git a/linkml_runtime/utils/introspection.py b/linkml_runtime/utils/introspection.py index f52ae82e..0f50aa77 100644 --- a/linkml_runtime/utils/introspection.py +++ b/linkml_runtime/utils/introspection.py @@ -1,9 +1,8 @@ -import logging import sys from functools import lru_cache from pathlib import Path from types import ModuleType -from typing import List, Type, Union +from typing import Union from linkml_runtime.linkml_model import ClassDefinition from linkml_runtime.utils.distroutils import get_schema_string @@ -26,7 +25,7 @@ def package_schema_path(package: Union[str, ModuleType]) -> Path: return path -@lru_cache() +@lru_cache def package_schemaview(package: str, **kwargs) -> SchemaView: """ Returns the corresponding SchemaView for a package diff --git a/linkml_runtime/utils/metamodelcore.py b/linkml_runtime/utils/metamodelcore.py index f46b8d4a..26093793 100644 --- a/linkml_runtime/utils/metamodelcore.py +++ b/linkml_runtime/utils/metamodelcore.py @@ -3,7 +3,7 @@ import re from dataclasses import field from decimal import Decimal -from typing import Union, Optional, Tuple +from typing import Union, Optional from urllib.parse import urlparse from rdflib import Literal, BNode, URIRef @@ -166,7 +166,7 @@ def __init__(self, v: str) -> None: term_name = re.compile("^[A-Za-z]([A-Za-z0-9._-]|/)*$") @classmethod - def ns_ln(cls, v: str) -> Optional[Tuple[str, str]]: + def ns_ln(cls, v: str) -> Optional[tuple[str, str]]: # See if this is indeed a valid CURIE, ie, it can be split by a colon curie_split = v.split(':', 1) if len(curie_split) == 1: diff --git a/linkml_runtime/utils/namespaces.py b/linkml_runtime/utils/namespaces.py index a7232210..20d9252a 100644 --- a/linkml_runtime/utils/namespaces.py +++ b/linkml_runtime/utils/namespaces.py @@ -1,5 +1,5 @@ import logging -from typing import Any, Tuple, Optional, Union +from typing import Any, Optional, Union from prefixcommons import curie_util from rdflib import Namespace, URIRef, Graph, BNode @@ -150,7 +150,7 @@ def curie_for(self, uri: Any, default_ok: bool = True, pythonform: bool = False) if pythonform: default_ok = False - match: Tuple[str, Optional[Namespace]] = ('', None) # match string / prefix + match: tuple[str, Optional[Namespace]] = ('', None) # match string / prefix uri_string = str(uri) # Find the longest match for the URI, self.items() is a list of (prefix/namespace, uri base prefix) tuples @@ -191,7 +191,7 @@ def curie_for(self, uri: Any, default_ok: bool = True, pythonform: bool = False) def prefix_for(self, uri_or_curie: Any, case_shift: bool = True) -> Optional[str]: return self.prefix_suffix(uri_or_curie, case_shift)[0] - def prefix_suffix(self, uri_or_curie: Any, case_shift: bool = True) -> Tuple[Optional[str], Optional[str]]: + def prefix_suffix(self, uri_or_curie: Any, case_shift: bool = True) -> tuple[Optional[str], Optional[str]]: uri_or_curie = str(uri_or_curie) if '://' in uri_or_curie: uri_or_curie = self.curie_for(uri_or_curie) diff --git a/linkml_runtime/utils/pattern.py b/linkml_runtime/utils/pattern.py index 8f74a5fc..941bd54e 100644 --- a/linkml_runtime/utils/pattern.py +++ b/linkml_runtime/utils/pattern.py @@ -1,9 +1,8 @@ from functools import lru_cache import re -from typing import Dict # We might want to deprecate this method in favor of PatternResolver in the future -def generate_patterns(schema_view) -> Dict[str, str]: +def generate_patterns(schema_view) -> dict[str, str]: """Generates a dictionary of slot patterns corresponding to the structured patterns in the settings. :param schema_view: SchemaView object with LinkML YAML @@ -27,7 +26,7 @@ def generate_patterns(schema_view) -> Dict[str, str]: return generated_patterns -class PatternResolver(): +class PatternResolver: # regular expression capturing the various use cases # for the optionally dot separated, curly braces bound, pattern syntax @@ -46,7 +45,7 @@ def __init__(self, schema_view): # substrings in the structured pattern syntax self.format_spec[k] = setting.setting_value - @lru_cache() + @lru_cache def resolve(self, pattern: str) -> str: # apply the regex to the pattern and look for matches matches = self.var_name.finditer(pattern) diff --git a/linkml_runtime/utils/permissiblevalueimpl.py b/linkml_runtime/utils/permissiblevalueimpl.py index 73c5e895..c7cd3043 100644 --- a/linkml_runtime/utils/permissiblevalueimpl.py +++ b/linkml_runtime/utils/permissiblevalueimpl.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Dict, Any, Optional, ClassVar, List, Union +from typing import Any, Optional, ClassVar, Union from rdflib import URIRef @@ -20,7 +20,7 @@ class PermissibleValue(YAMLRoot): """ a permissible value, accompanied by intended text and an optional mapping to a concept URI """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = LINKML.PermissibleValue class_class_curie: ClassVar[str] = "linkml:PermissibleValue" @@ -31,18 +31,18 @@ class PermissibleValue(YAMLRoot): description: Optional[str] = None meaning: Optional[Union[str, URIorCURIE]] = None deprecated: Optional[str] = None - todos: Optional[Union[str, List[str]]] = empty_list() - notes: Optional[Union[str, List[str]]] = empty_list() - comments: Optional[Union[str, List[str]]] = empty_list() + todos: Optional[Union[str, list[str]]] = empty_list() + notes: Optional[Union[str, list[str]]] = empty_list() + comments: Optional[Union[str, list[str]]] = empty_list() from_schema: Optional[Union[str, URI]] = None imported_from: Optional[str] = None - see_also: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + see_also: Optional[Union[Union[str, URIorCURIE], list[Union[str, URIorCURIE]]]] = empty_list() deprecated_element_has_exact_replacement: Optional[Union[str, URIorCURIE]] = None deprecated_element_has_possible_replacement: Optional[Union[str, URIorCURIE]] = None is_a: Optional[Union[str, PermissibleValueText]] = None - mixins: Optional[Union[Union[str, PermissibleValueText], List[Union[str, PermissibleValueText]]]] = empty_list() + mixins: Optional[Union[Union[str, PermissibleValueText], list[Union[str, PermissibleValueText]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.text is None: raise ValueError("text must be supplied") if not isinstance(self.text, PermissibleValueText): @@ -133,7 +133,7 @@ def __init__(self, *args, defn: EnumDefinitionImpl, **kwargs) -> None: super().__init__(*args, **kwargs) self._defn = defn - def __post_init__(self, **kwargs: Dict[str, Any]) -> None: + def __post_init__(self, **kwargs: dict[str, Any]) -> None: """ Make sure that we are correctly situated in the containing definition """ if self.text in self._defn: if self._defn.permissible_values[self.text] != self: diff --git a/linkml_runtime/utils/ruleutils.py b/linkml_runtime/utils/ruleutils.py index 2f1f664d..a9821e70 100644 --- a/linkml_runtime/utils/ruleutils.py +++ b/linkml_runtime/utils/ruleutils.py @@ -1,10 +1,8 @@ import logging from dataclasses import dataclass -from typing import Set, List, Union -from linkml_runtime.utils.schemaview import SchemaView, CLASS_NAME -from linkml_runtime.linkml_model.meta import SchemaDefinition, ClassDefinition, SlotDefinition, Expression, \ - ClassExpression, ClassDefinitionName, ClassRule, AnonymousClassExpression, SlotExpression, SlotDefinitionName +from linkml_runtime.utils.schemaview import SchemaView +from linkml_runtime.linkml_model.meta import ClassDefinition, SlotDefinition, ClassExpression, ClassDefinitionName, ClassRule, AnonymousClassExpression, SlotExpression, SlotDefinitionName logger = logging.getLogger(__name__) @@ -36,13 +34,13 @@ class DisjunctiveNormalFormClassExpression: """ A boolean combination of class expressions in Disjunctive Normal Form """ - operands: List[ClassExpressionConjunction] + operands: list[ClassExpressionConjunction] def __str__(self): return ' OR '.join([str(op) for op in self.operands]) -def get_range_as_disjunction(slot: SlotExpression) -> Set[ClassDefinitionName]: +def get_range_as_disjunction(slot: SlotExpression) -> set[ClassDefinitionName]: """ translate the range of a slot as defined by both range expressions and direct named class ranges to a disjunctive expression @@ -74,7 +72,7 @@ def get_range_as_disjunction(slot: SlotExpression) -> Set[ClassDefinitionName]: return conjs[0] -def get_disjunction(cx: ClassExpression) -> Set[ClassDefinitionName]: +def get_disjunction(cx: ClassExpression) -> set[ClassDefinitionName]: disj = set() if cx.is_a: disj.add(cx.is_a) @@ -85,7 +83,7 @@ def get_disjunction(cx: ClassExpression) -> Set[ClassDefinitionName]: def subclass_to_rules(view: SchemaView, child: ClassDefinitionName, parent: ClassDefinitionName, - type_designator_slot: SlotDefinitionName = None) -> List[ClassRule]: + type_designator_slot: SlotDefinitionName = None) -> list[ClassRule]: """ rolls up child class to parent class, turning class-specific slot_usages into rules :param view: diff --git a/linkml_runtime/utils/schema_as_dict.py b/linkml_runtime/utils/schema_as_dict.py index 34fe2f89..6432479b 100644 --- a/linkml_runtime/utils/schema_as_dict.py +++ b/linkml_runtime/utils/schema_as_dict.py @@ -1,4 +1,4 @@ -from typing import Dict, Any, Optional +from typing import Any, Optional import yaml @@ -49,7 +49,7 @@ def _remove_names(obj: Any, parent: Optional[str]) -> Any: return obj -def schema_as_dict(schema: SchemaDefinition) -> Dict: +def schema_as_dict(schema: SchemaDefinition) -> dict: """ Translates a SchemaDefinition object into a python dictionary, removing redundant elements diff --git a/linkml_runtime/utils/schema_builder.py b/linkml_runtime/utils/schema_builder.py index d37ec739..951a2df8 100644 --- a/linkml_runtime/utils/schema_builder.py +++ b/linkml_runtime/utils/schema_builder.py @@ -1,11 +1,11 @@ -from dataclasses import dataclass, field -from typing import Dict, List, Union, Optional +from dataclasses import dataclass +from typing import Union, Optional from linkml_runtime.linkml_model import (ClassDefinition, EnumDefinition, PermissibleValue, Prefix, SchemaDefinition, SlotDefinition, TypeDefinition) -from linkml_runtime.utils.formatutils import camelcase, underscore +from linkml_runtime.utils.formatutils import underscore from linkml_runtime.utils.schema_as_dict import schema_as_dict @@ -54,9 +54,9 @@ def __post_init__(self): def add_class( self, - cls: Union[ClassDefinition, Dict, str], - slots: List[Union[str, SlotDefinition]] = None, - slot_usage: Dict[str, SlotDefinition] = None, + cls: Union[ClassDefinition, dict, str], + slots: list[Union[str, SlotDefinition]] = None, + slot_usage: dict[str, SlotDefinition] = None, replace_if_present=False, use_attributes=False, **kwargs, @@ -103,7 +103,7 @@ def add_class( return self def add_slot( - self, slot: Union[SlotDefinition, Dict, str], class_name: str = None, replace_if_present=False, **kwargs + self, slot: Union[SlotDefinition, dict, str], class_name: str = None, replace_if_present=False, **kwargs ) -> "SchemaBuilder": """ Adds the slot to the schema. @@ -142,7 +142,7 @@ def set_slot(self, slot_name: str, **kwargs) -> "SchemaBuilder": def add_enum( self, enum_def: Union[EnumDefinition, dict, str], - permissible_values: List[Union[str, PermissibleValue]] = None, + permissible_values: list[Union[str, PermissibleValue]] = None, replace_if_present=False, **kwargs, ) -> "SchemaBuilder": @@ -217,7 +217,7 @@ def add_defaults(self) -> "SchemaBuilder": def add_type( self, - type: Union[TypeDefinition, Dict, str], + type: Union[TypeDefinition, dict, str], typeof: str = None, uri: str = None, replace_if_present=False, @@ -247,7 +247,7 @@ def add_type( setattr(type, k, v) return self - def as_dict(self) -> Dict: + def as_dict(self) -> dict: """ Returns the schema as a dictionary. diff --git a/linkml_runtime/utils/schemaops.py b/linkml_runtime/utils/schemaops.py index ce6374fc..361d83b1 100644 --- a/linkml_runtime/utils/schemaops.py +++ b/linkml_runtime/utils/schemaops.py @@ -1,9 +1,8 @@ -from typing import List, Union +from typing import Union from linkml_runtime.utils.schemaview import SchemaView, CLASS_NAME -from linkml_runtime.linkml_model.meta import SchemaDefinition, ClassDefinition -CLASS_NAME_OR_LIST = Union[CLASS_NAME, List[CLASS_NAME]] +CLASS_NAME_OR_LIST = Union[CLASS_NAME, list[CLASS_NAME]] def roll_up(sv: SchemaView, classes: CLASS_NAME_OR_LIST = None, mixins=True, is_a=True, delete=True) -> None: """ @@ -38,7 +37,7 @@ def roll_up(sv: SchemaView, classes: CLASS_NAME_OR_LIST = None, mixins=True, is_ sv.delete_class(d) sv.set_modified() -def roll_down(sv: SchemaView, classes: List[CLASS_NAME] = None, mixins=True, is_a=True, delete=True) -> None: +def roll_down(sv: SchemaView, classes: list[CLASS_NAME] = None, mixins=True, is_a=True, delete=True) -> None: """ rolls down to a set of descendant classes diff --git a/linkml_runtime/utils/schemaview.py b/linkml_runtime/utils/schemaview.py index 1bc97f1e..c3d15758 100644 --- a/linkml_runtime/utils/schemaview.py +++ b/linkml_runtime/utils/schemaview.py @@ -6,7 +6,8 @@ from copy import copy, deepcopy from collections import defaultdict, deque from pathlib import Path -from typing import Mapping, Optional, Tuple, TypeVar +from typing import Optional, TypeVar +from collections.abc import Mapping import warnings from linkml_runtime.utils.namespaces import Namespaces @@ -107,7 +108,7 @@ def is_absolute_path(path: str) -> bool: @dataclass -class SchemaUsage(): +class SchemaUsage: """ A usage of an element of a schema """ @@ -119,7 +120,7 @@ class SchemaUsage(): @dataclass -class SchemaView(object): +class SchemaView: """ A SchemaView provides a virtual schema layered on top of a schema plus its import closure @@ -1242,7 +1243,7 @@ def get_element_by_mapping(self, mapping_id: URIorCURIE) -> List[str]: model_elements.append(element.name) return model_elements - def get_mapping_index(self, imports=True, expand=False) -> Dict[URIorCURIE, List[Tuple[MAPPING_TYPE, Element]]]: + def get_mapping_index(self, imports=True, expand=False) -> Dict[URIorCURIE, List[tuple[MAPPING_TYPE, Element]]]: """ Returns an index of all elements keyed by the mapping value. The index values are tuples of mapping type and element diff --git a/linkml_runtime/utils/schemaview_cli.py b/linkml_runtime/utils/schemaview_cli.py index 7d4a862e..44256451 100644 --- a/linkml_runtime/utils/schemaview_cli.py +++ b/linkml_runtime/utils/schemaview_cli.py @@ -1,9 +1,6 @@ import io import json import logging -import re -from pathlib import Path -from typing import Dict, List, Tuple from json_flattener import flatten_to_csv @@ -11,7 +8,7 @@ from linkml_runtime.utils.schemaview import SchemaView from linkml_runtime.dumpers import json_dumper, yaml_dumper import click -import yaml +import builtins logger = logging.getLogger(__name__) @@ -138,7 +135,7 @@ def delete(schema, class_names): print(yaml_dumper.dumps(schema_view.schema)) -def _show_elements(elements: List[Element], columns=None, output = io.StringIO()) -> None: +def _show_elements(elements: builtins.list[Element], columns=None, output = io.StringIO()) -> None: elements_j = json.loads(json_dumper.dumps(elements, inject_type=False)) if columns is not None and columns != '' and columns != [] and columns != '%': if isinstance(columns, str): diff --git a/linkml_runtime/utils/slot.py b/linkml_runtime/utils/slot.py index bdc0b309..82adbf40 100644 --- a/linkml_runtime/utils/slot.py +++ b/linkml_runtime/utils/slot.py @@ -1,5 +1,6 @@ from dataclasses import dataclass -from typing import Type, List, Optional, Any, re +from typing import Optional, Any +from re import Pattern from rdflib import URIRef @@ -12,7 +13,7 @@ class Slot: curie: Optional[str] model_uri: URIRef - domain: Optional[Type] + domain: Optional[type] range: Any - mappings: Optional[List[URIRef]] = None - pattern: Optional[re] = None + mappings: Optional[list[URIRef]] = None + pattern: Optional[Pattern] = None diff --git a/linkml_runtime/utils/walker_utils.py b/linkml_runtime/utils/walker_utils.py index ba9190c7..1aa0061c 100644 --- a/linkml_runtime/utils/walker_utils.py +++ b/linkml_runtime/utils/walker_utils.py @@ -3,7 +3,7 @@ """ from copy import deepcopy -from typing import Callable, Union, List, Dict, Any +from typing import Callable, Union, Any from linkml_runtime.utils.yamlutils import YAMLRoot @@ -21,7 +21,7 @@ def traverse_object_tree(obj: YAMLRoot, func: Callable, mutate: bool = True) -> # implementation for traverse_object_tree, but also accepts lists, dicts -def _traverse_object_tree_1(obj: Union[YAMLRoot, List, Dict], func: Callable, +def _traverse_object_tree_1(obj: Union[YAMLRoot, list, dict], func: Callable, mutate: bool = True) -> Any: if isinstance(obj, list): return [_traverse_object_tree_1(x, func, mutate) for x in obj] diff --git a/linkml_runtime/utils/yamlutils.py b/linkml_runtime/utils/yamlutils.py index 219cb135..2a5b2832 100644 --- a/linkml_runtime/utils/yamlutils.py +++ b/linkml_runtime/utils/yamlutils.py @@ -1,6 +1,6 @@ from copy import copy from json import JSONDecoder -from typing import Union, Any, List, Optional, Type, Callable, Dict +from typing import Union, Any, Optional, Callable from pprint import pformat import textwrap import re @@ -8,12 +8,11 @@ import yaml from deprecated.classic import deprecated from jsonasobj2 import JsonObj, as_json, as_dict, JsonObjTypes, items -import jsonasobj2 from rdflib import Graph, URIRef from yaml.constructor import ConstructorError from linkml_runtime.utils.context_utils import CONTEXTS_PARAM_TYPE, merge_contexts -from linkml_runtime.utils.formatutils import is_empty, remove_empty_items, is_list, is_dict, items +from linkml_runtime.utils.formatutils import is_empty, items YAMLObjTypes = Union[JsonObjTypes, "YAMLRoot"] @@ -44,9 +43,9 @@ def __init__(self, *args, **kwargs): """ super().__init__(*args, **kwargs) - def __post_init__(self, *args: List[str], **kwargs): + def __post_init__(self, *args: list[str], **kwargs): if args or kwargs: - messages: List[str] = [] + messages: list[str] = [] for v in args: v = repr(v)[:40].replace('\n', '\\n') messages.append(f"Unknown positional argument: {v}") @@ -101,13 +100,13 @@ def _is_empty(v: Any) -> bool: # TODO: Deprecate this function and migrate the python generator over to the stand alone is_empty return is_empty(v) - def _normalize_inlined_as_list(self, slot_name: str, slot_type: Type, key_name: str, keyed: bool) -> None: + def _normalize_inlined_as_list(self, slot_name: str, slot_type: type, key_name: str, keyed: bool) -> None: self._normalize_inlined(slot_name, slot_type, key_name, keyed, True) - def _normalize_inlined_as_dict(self, slot_name: str, slot_type: Type, key_name: str, keyed: bool) -> None: + def _normalize_inlined_as_dict(self, slot_name: str, slot_type: type, key_name: str, keyed: bool) -> None: self._normalize_inlined(slot_name, slot_type, key_name, keyed, False) - def _normalize_inlined(self, slot_name: str, slot_type: Type, key_name: str, keyed: bool, is_list: bool) \ + def _normalize_inlined(self, slot_name: str, slot_type: type, key_name: str, keyed: bool, is_list: bool) \ -> None: """ __post_init__ function for a list of inlined keyed or identified classes. @@ -149,7 +148,7 @@ def loc(s): loc_str = '' return loc_str + str(s) - def form_1(entries: Dict[Any, Optional[Union[dict, JsonObj]]]) -> None: + def form_1(entries: dict[Any, Optional[Union[dict, JsonObj]]]) -> None: """ A dictionary of key:dict entries where key is the identifier and dict is an instance of slot_type """ for key, raw_obj in items(entries): if raw_obj is None: @@ -217,7 +216,7 @@ def form_1(entries: Dict[Any, Optional[Union[dict, JsonObj]]]) -> None: raise ValueError(f"Unrecognized entry: {loc(k)}: {str(v)}") self[slot_name] = cooked_slot - def _normalize_inlined_slot(self, slot_name: str, slot_type: Type, key_name: Optional[str], + def _normalize_inlined_slot(self, slot_name: str, slot_type: type, key_name: Optional[str], inlined_as_list: Optional[bool], keyed: bool) -> None: """ A deprecated entry point to slot normalization. Used for models generated prior to the linkml-runtime split. @@ -252,7 +251,7 @@ def _normalize_inlined_slot(self, slot_name: str, slot_type: Type, key_name: Opt self._normalize_inlined_as_dict(slot_name, slot_type, key_name, keyed) @classmethod - def _class_for(cls, attribute: str, uri_or_curie: Union[str, URIRef]) -> Optional[Type["YAMLRoot"]]: + def _class_for(cls, attribute: str, uri_or_curie: Union[str, URIRef]) -> Optional[type["YAMLRoot"]]: """ Locate self or descendant class that has attribute == uri_or_curie """ if getattr(cls, attribute, None) == uri_or_curie: return cls @@ -263,14 +262,14 @@ def _class_for(cls, attribute: str, uri_or_curie: Union[str, URIRef]) -> Optiona return None @classmethod - def _class_for_uri(cls: Type["YAMLRoot"], uri: str, use_model_uri: bool = False) -> Optional[Type["YAMLRoot"]]: + def _class_for_uri(cls: type["YAMLRoot"], uri: str, use_model_uri: bool = False) -> Optional[type["YAMLRoot"]]: """ Return the self or descendant of self having with a matching class uri """ return cls._class_for('class_model_uri' if use_model_uri else 'class_class_uri', URIRef(uri)) @classmethod - def _class_for_curie(cls: Type["YAMLRoot"], curie: str) -> Optional[Type["YAMLRoot"]]: + def _class_for_curie(cls: type["YAMLRoot"], curie: str) -> Optional[type["YAMLRoot"]]: return cls._class_for('class_class_curie', curie) # ================== @@ -341,7 +340,7 @@ def root_representer(dumper: yaml.Dumper, data: YAMLRoot): return dumper.represent_data(rval) -def from_yaml(data: str, cls: Type[YAMLRoot]) -> YAMLRoot: +def from_yaml(data: str, cls: type[YAMLRoot]) -> YAMLRoot: return cls(**yaml.load(data, DupCheckYamlLoader)) @@ -455,7 +454,7 @@ def map_constructor(loader, node, deep=False): """ if not isinstance(node, yaml.MappingNode): - raise ConstructorError(None, None, "expected a mapping node, but found %s" % node.id, node.start_mark) + raise ConstructorError(None, None, f"expected a mapping node, but found {node.id}", node.start_mark) mapping = {} for key_node, value_node in node.value: key = loader.construct_object(key_node, deep=deep) @@ -469,7 +468,7 @@ def map_constructor(loader, node, deep=False): def seq_constructor(loader, node, deep=False): if not isinstance(node, yaml.SequenceNode): raise ConstructorError(None, None, - "expected a sequence node, but found %s" % node.id, + f"expected a sequence node, but found {node.id}", node.start_mark) for child in node.value: if not child.value: diff --git a/notebooks/SchemaView_BioLink.ipynb b/notebooks/SchemaView_BioLink.ipynb index 49a4dc4a..57fa54a0 100644 --- a/notebooks/SchemaView_BioLink.ipynb +++ b/notebooks/SchemaView_BioLink.ipynb @@ -4,191 +4,191 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, + "outputs": [], "source": [ "from linkml_runtime.utils.schemaview import SchemaView" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, + "outputs": [], "source": [ "view = SchemaView(\"../tests/test_utils/input/biolink-model.yaml\")" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, + "outputs": [], "source": [ "view.imports_closure()" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, + "outputs": [], "source": [ "len(view.all_classes()), len(view.all_slots()), len(view.all_subsets())" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, + "outputs": [], "source": [ "view.class_ancestors('gene')" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, + "outputs": [], "source": [ "[view.get_uri(c) for c in view.class_ancestors('gene')]" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, + "outputs": [], "source": [ "[view.get_uri(c, expand=True) for c in view.class_ancestors('gene')]" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, + "outputs": [], "source": [ "view.class_ancestors('gene', mixins=False)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, + "outputs": [], "source": [ "view.slot_ancestors('affects')" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, + "outputs": [], "source": [ "view.slot_children('affects')" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, + "outputs": [], "source": [ "affects = view.get_slot('affects')" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, + "outputs": [], "source": [ "affects.exact_mappings" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, + "outputs": [], "source": [ "view.get_mappings(affects.name)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, + "outputs": [], "source": [ "view.get_mappings(affects.name, expand=True)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, + "outputs": [], "source": [ "[c for c in view.all_classes().keys() if view.is_relationship(c)][0:20]" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, + "outputs": [], "source": [ "view.annotation_dict(affects.name)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, + "outputs": [], "source": [ "affects.annotations" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, + "outputs": [], "source": [ - "from linkml_runtime.linkml_model.annotations import Annotation, Annotatable\n", + "from linkml_runtime.linkml_model.annotations import Annotatable\n", "\n", "isinstance(affects, Annotatable)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, + "outputs": [], "source": [ "affects" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, + "outputs": [], "source": [ "e = view.get_element('affects')\n", "e" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, - "source": [], - "outputs": [] + "outputs": [], + "source": [] } ], "metadata": { diff --git a/notebooks/SchemaView_Monarch.ipynb b/notebooks/SchemaView_Monarch.ipynb index 98ec7743..ef527bcf 100644 --- a/notebooks/SchemaView_Monarch.ipynb +++ b/notebooks/SchemaView_Monarch.ipynb @@ -5,31 +5,31 @@ "execution_count": 1, "id": "3e37f9e6", "metadata": {}, + "outputs": [], "source": [ "# what biolink:category does my identifier represent\n", "# how to find the predicates used for gene to disease mappings\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 14, "id": "169c9e40", "metadata": {}, + "outputs": [], "source": [ "from linkml_runtime.utils.schemaview import SchemaView\n", "import requests \n", - "from pprint import pprint\n", "# note you can also use a path on a local filesystem\n", "view = SchemaView(\"https://raw.githubusercontent.com/biolink/biolink-model/master/biolink-model.yaml\")" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 15, "id": "54424ac5", "metadata": {}, + "outputs": [], "source": [ "# what biolink:category does my identifier represent?\n", "# id_prefixes\n", @@ -40,50 +40,50 @@ "\n", "element = view.get_element('phenotype of')\n", "print(element.name)\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 16, "id": "61eeb009", "metadata": {}, + "outputs": [], "source": [ "# find inverses of a predicate\n", "print(\"inverse is: \" + view.inverse(element.name))" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 17, "id": "91212ad9", "metadata": {}, + "outputs": [], "source": [ "# id_prefixes\n", "prefixed_categories = view.get_elements_applicable_by_identifier(\"DOID:4\")\n", "print(prefixed_categories)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 18, "id": "49d364e9", "metadata": {}, + "outputs": [], "source": [ "# mappings \n", "\n", "mapped_categories = view.get_category_by_mapping('SO:0001583')\n", "print(mapped_categories)\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 21, "id": "a7a0fa3f", "metadata": {}, + "outputs": [], "source": [ "# object = 'gene'\n", "# object = 'disease'\n", @@ -112,41 +112,41 @@ " else:\n", " print(exact_mapping + \": can't find any matching terms in OLS that don't return 404 errors\")\n", " " - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 10, "id": "5fbbc1c1", "metadata": {}, + "outputs": [], "source": [ "# is my element a mixin?\n", "\n", "e = view.get_element('gene or gene product')\n", "view.is_mixin(e.name)" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 22, "id": "5ab2f5c3", "metadata": {}, + "outputs": [], "source": [ "# view poly hierarchy - a gene is a chemical and biological entity\n", "\n", "ancestors = view.class_ancestors('gene')\n", "for a in ancestors:\n", " print(a)\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 23, "id": "2f9e0c55", "metadata": {}, + "outputs": [], "source": [ "# how to find the predicates used for gene to disease mappings\n", "# association: \n", @@ -161,14 +161,14 @@ "for a in associations:\n", " if a.startswith('gene'):\n", " print(a)\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": 26, "id": "2779d0d9", "metadata": {}, + "outputs": [], "source": [ "for association in associations:\n", " domain_element = view.get_element(view.induced_slot('subject', association).range)\n", @@ -180,29 +180,28 @@ " if 'gene or gene product' in view.class_ancestors(domain_element.name) and 'disease' in view.class_ancestors(range_element.name):\n", " print(association)\n", " print(view.induced_slot('subject', association))\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": null, "id": "04093dc5", "metadata": {}, + "outputs": [], "source": [ "# find predicates for those associations\n", "# at this point, navigating the online doc might be easiest if you just want answers. \n", "# programatically, we can get the predicates that have equivalent domain and range constraints to find which \n", "# coudl be used for associations above.\n" - ], - "outputs": [] + ] }, { "cell_type": "code", "execution_count": null, "id": "6c8ade22", "metadata": {}, - "source": [], - "outputs": [] + "outputs": [], + "source": [] } ], "metadata": { diff --git a/poetry.lock b/poetry.lock index afd28039..be90c706 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,47 +1,44 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "annotated-types" -version = "0.6.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "attrs" -version = "23.2.0" +version = "24.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" files = [ - {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, - {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, + {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, + {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, ] [package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"] -tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "cattrs" -version = "23.2.3" +version = "24.1.2" description = "Composable complex class support for attrs and dataclasses." optional = false python-versions = ">=3.8" files = [ - {file = "cattrs-23.2.3-py3-none-any.whl", hash = "sha256:0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108"}, - {file = "cattrs-23.2.3.tar.gz", hash = "sha256:a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f"}, + {file = "cattrs-24.1.2-py3-none-any.whl", hash = "sha256:67c7495b760168d931a10233f979b28dc04daf853b30752246f4f8471c6d68d0"}, + {file = "cattrs-24.1.2.tar.gz", hash = "sha256:8028cfe1ff5382df59dd36474a86e02d817b06eaf8af84555441bac915d2ef85"}, ] [package.dependencies] @@ -53,6 +50,7 @@ typing-extensions = {version = ">=4.1.0,<4.6.3 || >4.6.3", markers = "python_ver bson = ["pymongo (>=4.4.0)"] cbor2 = ["cbor2 (>=5.4.6)"] msgpack = ["msgpack (>=1.0.5)"] +msgspec = ["msgspec (>=0.18.5)"] orjson = ["orjson (>=3.9.2)"] pyyaml = ["pyyaml (>=6.0)"] tomlkit = ["tomlkit (>=0.11.8)"] @@ -60,112 +58,127 @@ ujson = ["ujson (>=5.7.0)"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, + {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] [[package]] name = "charset-normalizer" -version = "3.3.2" +version = "3.4.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" files = [ - {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, - {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, + {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, + {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, + {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, + {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, + {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, + {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, + {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, + {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, + {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, ] [[package]] @@ -257,22 +270,22 @@ toml = ["tomli"] [[package]] name = "curies" -version = "0.7.7" -description = "Idiomatic conversion between URIs and compact URIs (CURIEs)." +version = "0.8.0" +description = "Idiomatic conversion between URIs and compact URIs (CURIEs)" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "curies-0.7.7-py3-none-any.whl", hash = "sha256:609de3e8cdf39f410e8f4d9f06eb7df379465860f4fb441bf0e79672430f8e2a"}, - {file = "curies-0.7.7.tar.gz", hash = "sha256:a8d674029f906fb9c3564eafa0862ce96725932bd801fa751e076265b111cb34"}, + {file = "curies-0.8.0-py3-none-any.whl", hash = "sha256:da2f47270a778cc3ac5e573c1fcaab5c7f7ea91d9b542ada50d5fafb240997cd"}, + {file = "curies-0.8.0.tar.gz", hash = "sha256:be743facd2cc33cf3f827e318f846dcc192e7f7787a2bf215cb4c317e94ac02d"}, ] [package.dependencies] -pydantic = "*" +pydantic = ">=2.0" pytrie = "*" requests = "*" [package.extras] -docs = ["sphinx", "sphinx-automodapi", "sphinx-rtd-theme"] +docs = ["sphinx (>=8)", "sphinx-automodapi", "sphinx-rtd-theme (>=3.0)"] fastapi = ["defusedxml", "fastapi", "httpx", "python-multipart", "uvicorn"] flask = ["defusedxml", "flask"] pandas = ["pandas"] @@ -298,13 +311,13 @@ dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -323,32 +336,17 @@ files = [ [[package]] name = "idna" -version = "3.6" +version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, -] - -[[package]] -name = "importlib-resources" -version = "6.1.1" -description = "Read resources from Python packages" -optional = false -python-versions = ">=3.8" +python-versions = ">=3.6" files = [ - {file = "importlib_resources-6.1.1-py3-none-any.whl", hash = "sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6"}, - {file = "importlib_resources-6.1.1.tar.gz", hash = "sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a"}, + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, ] -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff", "zipp (>=3.17)"] +all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] name = "iniconfig" @@ -406,88 +404,75 @@ hbreader = "*" [[package]] name = "jsonschema" -version = "4.21.1" +version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.21.1-py3-none-any.whl", hash = "sha256:7996507afae316306f9e2290407761157c6f78002dcf7419acb99822143d1c6f"}, - {file = "jsonschema-4.21.1.tar.gz", hash = "sha256:85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5"}, + {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, + {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, ] [package.dependencies] attrs = ">=22.2.0" -importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} jsonschema-specifications = ">=2023.03.6" -pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} referencing = ">=0.28.4" rpds-py = ">=0.7.1" [package.extras] format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] [[package]] name = "jsonschema-specifications" -version = "2023.12.1" +version = "2024.10.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"}, - {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"}, + {file = "jsonschema_specifications-2024.10.1-py3-none-any.whl", hash = "sha256:a09a0680616357d9a0ecf05c12ad234479f549239d0f5b55f3deea67475da9bf"}, + {file = "jsonschema_specifications-2024.10.1.tar.gz", hash = "sha256:0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272"}, ] [package.dependencies] -importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} referencing = ">=0.31.0" [[package]] name = "packaging" -version = "23.2" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, -] - -[[package]] -name = "pkgutil-resolve-name" -version = "1.3.10" -description = "Resolve a name to an object." -optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, - {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] name = "platformdirs" -version = "4.2.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.3.6" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, + {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, + {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, ] [package.extras] -docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.11.2)"] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -513,13 +498,13 @@ requests = ">=2.28.1,<3.0.0" [[package]] name = "prefixmaps" -version = "0.2.2" +version = "0.2.5" description = "A python library for retrieving semantic prefix maps" optional = false -python-versions = ">=3.8,<4.0" +python-versions = "<4.0,>=3.8" files = [ - {file = "prefixmaps-0.2.2-py3-none-any.whl", hash = "sha256:4ac2bf3ddb9b27c40c978cf937e9bedb160050d24e8c679b94c9c885e1d73c72"}, - {file = "prefixmaps-0.2.2.tar.gz", hash = "sha256:a36b1554154ef465271bde82dc91cd671e2d31dc1f50c2fd08ccb0d7d5791c33"}, + {file = "prefixmaps-0.2.5-py3-none-any.whl", hash = "sha256:68caa04b3a6a8e058aa1c55affe32c62e44b564d031d63f768e267b796a1f3ee"}, + {file = "prefixmaps-0.2.5.tar.gz", hash = "sha256:aaccd2425ade2ea97a502c58be49fe8f3536e3d5e919712ae0358a39fc800799"}, ] [package.dependencies] @@ -528,109 +513,123 @@ pyyaml = ">=5.3.1" [[package]] name = "pydantic" -version = "2.6.1" +version = "2.9.2" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, - {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, ] [package.dependencies] -annotated-types = ">=0.4.0" -pydantic-core = "2.16.2" -typing-extensions = ">=4.6.1" +annotated-types = ">=0.6.0" +pydantic-core = "2.23.4" +typing-extensions = [ + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, +] [package.extras] email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.16.2" -description = "" +version = "2.23.4" +description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, - {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, - {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, - {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, - {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, - {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, - {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, - {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, - {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, - {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, - {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, - {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, - {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, - {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, + {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, + {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, + {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, + {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, + {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, + {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, + {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, + {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, + {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, + {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, ] [package.dependencies] @@ -638,13 +637,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pyparsing" -version = "3.1.1" +version = "3.1.4" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.6.8" files = [ - {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, - {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, + {file = "pyparsing-3.1.4-py3-none-any.whl", hash = "sha256:a6a7ee4235a3f944aa1fa2249307708f893fe5717dc603503c6c7969c070fb7c"}, + {file = "pyparsing-3.1.4.tar.gz", hash = "sha256:f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032"}, ] [package.extras] @@ -652,13 +651,13 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "8.0.1" +version = "8.3.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca"}, - {file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [package.dependencies] @@ -666,11 +665,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.3.0,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.5,<2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-logging" @@ -701,73 +700,75 @@ sortedcontainers = "*" [[package]] name = "pyyaml" -version = "6.0.1" +version = "6.0.2" description = "YAML parser and emitter for Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, + {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"}, + {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"}, + {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"}, + {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"}, + {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"}, + {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"}, + {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"}, + {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"}, + {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"}, + {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"}, + {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"}, + {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"}, + {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"}, + {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"}, + {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"}, + {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"}, + {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"}, + {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"}, + {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"}, + {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"}, + {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"}, + {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"}, + {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"}, + {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"}, + {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"}, + {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"}, + {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"}, + {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"}, + {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"}, + {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"}, + {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] [[package]] name = "rdflib" -version = "6.3.2" +version = "7.0.0" description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information." optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "rdflib-6.3.2-py3-none-any.whl", hash = "sha256:36b4e74a32aa1e4fa7b8719876fb192f19ecd45ff932ea5ebbd2e417a0247e63"}, - {file = "rdflib-6.3.2.tar.gz", hash = "sha256:72af591ff704f4caacea7ecc0c5a9056b8553e0489dd4f35a9bc52dbd41522e0"}, + {file = "rdflib-7.0.0-py3-none-any.whl", hash = "sha256:0438920912a642c866a513de6fe8a0001bd86ef975057d6962c79ce4771687cd"}, + {file = "rdflib-7.0.0.tar.gz", hash = "sha256:9995eb8569428059b8c1affd26b25eac510d64f5043d9ce8c84e0d0036e995ae"}, ] [package.dependencies] @@ -782,13 +783,13 @@ networkx = ["networkx (>=2.0.0,<3.0.0)"] [[package]] name = "referencing" -version = "0.33.0" +version = "0.35.1" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" files = [ - {file = "referencing-0.33.0-py3-none-any.whl", hash = "sha256:39240f2ecc770258f28b642dd47fd74bc8b02484de54e1882b74b35ebd779bd5"}, - {file = "referencing-0.33.0.tar.gz", hash = "sha256:c775fedf74bc0f9189c2a3be1c12fd03e8c23f4d371dce795df44e06c5b412f7"}, + {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, + {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, ] [package.dependencies] @@ -797,13 +798,13 @@ rpds-py = ">=0.7.0" [[package]] name = "requests" -version = "2.31.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -818,13 +819,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-cache" -version = "1.2.0" +version = "1.2.1" description = "A persistent cache for python requests" optional = false python-versions = ">=3.8" files = [ - {file = "requests_cache-1.2.0-py3-none-any.whl", hash = "sha256:490324301bf0cb924ff4e6324bd2613453e7e1f847353928b08adb0fdfb7f722"}, - {file = "requests_cache-1.2.0.tar.gz", hash = "sha256:db1c709ca343cc1cd5b6c8b1a5387298eceed02306a6040760db538c885e3838"}, + {file = "requests_cache-1.2.1-py3-none-any.whl", hash = "sha256:1285151cddf5331067baa82598afe2d47c7495a1334bfe7a7d329b43e9fd3603"}, + {file = "requests_cache-1.2.1.tar.gz", hash = "sha256:68abc986fdc5b8d0911318fbb5f7c80eebcd4d01bfacc6685ecf8876052511d1"}, ] [package.dependencies] @@ -848,110 +849,114 @@ yaml = ["pyyaml (>=6.0.1)"] [[package]] name = "rpds-py" -version = "0.18.0" +version = "0.20.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" files = [ - {file = "rpds_py-0.18.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5b4e7d8d6c9b2e8ee2d55c90b59c707ca59bc30058269b3db7b1f8df5763557e"}, - {file = "rpds_py-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c463ed05f9dfb9baebef68048aed8dcdc94411e4bf3d33a39ba97e271624f8f7"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01e36a39af54a30f28b73096dd39b6802eddd04c90dbe161c1b8dbe22353189f"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d62dec4976954a23d7f91f2f4530852b0c7608116c257833922a896101336c51"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd18772815d5f008fa03d2b9a681ae38d5ae9f0e599f7dda233c439fcaa00d40"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:923d39efa3cfb7279a0327e337a7958bff00cc447fd07a25cddb0a1cc9a6d2da"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39514da80f971362f9267c600b6d459bfbbc549cffc2cef8e47474fddc9b45b1"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a34d557a42aa28bd5c48a023c570219ba2593bcbbb8dc1b98d8cf5d529ab1434"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:93df1de2f7f7239dc9cc5a4a12408ee1598725036bd2dedadc14d94525192fc3"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:34b18ba135c687f4dac449aa5157d36e2cbb7c03cbea4ddbd88604e076aa836e"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c0b5dcf9193625afd8ecc92312d6ed78781c46ecbf39af9ad4681fc9f464af88"}, - {file = "rpds_py-0.18.0-cp310-none-win32.whl", hash = "sha256:c4325ff0442a12113a6379af66978c3fe562f846763287ef66bdc1d57925d337"}, - {file = "rpds_py-0.18.0-cp310-none-win_amd64.whl", hash = "sha256:7223a2a5fe0d217e60a60cdae28d6949140dde9c3bcc714063c5b463065e3d66"}, - {file = "rpds_py-0.18.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3a96e0c6a41dcdba3a0a581bbf6c44bb863f27c541547fb4b9711fd8cf0ffad4"}, - {file = "rpds_py-0.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30f43887bbae0d49113cbaab729a112251a940e9b274536613097ab8b4899cf6"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fcb25daa9219b4cf3a0ab24b0eb9a5cc8949ed4dc72acb8fa16b7e1681aa3c58"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d68c93e381010662ab873fea609bf6c0f428b6d0bb00f2c6939782e0818d37bf"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b34b7aa8b261c1dbf7720b5d6f01f38243e9b9daf7e6b8bc1fd4657000062f2c"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e6d75ab12b0bbab7215e5d40f1e5b738aa539598db27ef83b2ec46747df90e1"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8612cd233543a3781bc659c731b9d607de65890085098986dfd573fc2befe5"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aec493917dd45e3c69d00a8874e7cbed844efd935595ef78a0f25f14312e33c6"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:661d25cbffaf8cc42e971dd570d87cb29a665f49f4abe1f9e76be9a5182c4688"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1df3659d26f539ac74fb3b0c481cdf9d725386e3552c6fa2974f4d33d78e544b"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a1ce3ba137ed54f83e56fb983a5859a27d43a40188ba798993812fed73c70836"}, - {file = "rpds_py-0.18.0-cp311-none-win32.whl", hash = "sha256:69e64831e22a6b377772e7fb337533c365085b31619005802a79242fee620bc1"}, - {file = "rpds_py-0.18.0-cp311-none-win_amd64.whl", hash = "sha256:998e33ad22dc7ec7e030b3df701c43630b5bc0d8fbc2267653577e3fec279afa"}, - {file = "rpds_py-0.18.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:7f2facbd386dd60cbbf1a794181e6aa0bd429bd78bfdf775436020172e2a23f0"}, - {file = "rpds_py-0.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1d9a5be316c15ffb2b3c405c4ff14448c36b4435be062a7f578ccd8b01f0c4d8"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd5bf1af8efe569654bbef5a3e0a56eca45f87cfcffab31dd8dde70da5982475"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5417558f6887e9b6b65b4527232553c139b57ec42c64570569b155262ac0754f"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:56a737287efecafc16f6d067c2ea0117abadcd078d58721f967952db329a3e5c"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8f03bccbd8586e9dd37219bce4d4e0d3ab492e6b3b533e973fa08a112cb2ffc9"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4457a94da0d5c53dc4b3e4de1158bdab077db23c53232f37a3cb7afdb053a4e3"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ab39c1ba9023914297dd88ec3b3b3c3f33671baeb6acf82ad7ce883f6e8e157"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9d54553c1136b50fd12cc17e5b11ad07374c316df307e4cfd6441bea5fb68496"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0af039631b6de0397ab2ba16eaf2872e9f8fca391b44d3d8cac317860a700a3f"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:84ffab12db93b5f6bad84c712c92060a2d321b35c3c9960b43d08d0f639d60d7"}, - {file = "rpds_py-0.18.0-cp312-none-win32.whl", hash = "sha256:685537e07897f173abcf67258bee3c05c374fa6fff89d4c7e42fb391b0605e98"}, - {file = "rpds_py-0.18.0-cp312-none-win_amd64.whl", hash = "sha256:e003b002ec72c8d5a3e3da2989c7d6065b47d9eaa70cd8808b5384fbb970f4ec"}, - {file = "rpds_py-0.18.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:08f9ad53c3f31dfb4baa00da22f1e862900f45908383c062c27628754af2e88e"}, - {file = "rpds_py-0.18.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0013fe6b46aa496a6749c77e00a3eb07952832ad6166bd481c74bda0dcb6d58"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e32a92116d4f2a80b629778280103d2a510a5b3f6314ceccd6e38006b5e92dcb"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e541ec6f2ec456934fd279a3120f856cd0aedd209fc3852eca563f81738f6861"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bed88b9a458e354014d662d47e7a5baafd7ff81c780fd91584a10d6ec842cb73"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2644e47de560eb7bd55c20fc59f6daa04682655c58d08185a9b95c1970fa1e07"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e8916ae4c720529e18afa0b879473049e95949bf97042e938530e072fde061d"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:465a3eb5659338cf2a9243e50ad9b2296fa15061736d6e26240e713522b6235c"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ea7d4a99f3b38c37eac212dbd6ec42b7a5ec51e2c74b5d3223e43c811609e65f"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:67071a6171e92b6da534b8ae326505f7c18022c6f19072a81dcf40db2638767c"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:41ef53e7c58aa4ef281da975f62c258950f54b76ec8e45941e93a3d1d8580594"}, - {file = "rpds_py-0.18.0-cp38-none-win32.whl", hash = "sha256:fdea4952db2793c4ad0bdccd27c1d8fdd1423a92f04598bc39425bcc2b8ee46e"}, - {file = "rpds_py-0.18.0-cp38-none-win_amd64.whl", hash = "sha256:7cd863afe7336c62ec78d7d1349a2f34c007a3cc6c2369d667c65aeec412a5b1"}, - {file = "rpds_py-0.18.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5307def11a35f5ae4581a0b658b0af8178c65c530e94893345bebf41cc139d33"}, - {file = "rpds_py-0.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77f195baa60a54ef9d2de16fbbfd3ff8b04edc0c0140a761b56c267ac11aa467"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39f5441553f1c2aed4de4377178ad8ff8f9d733723d6c66d983d75341de265ab"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a00312dea9310d4cb7dbd7787e722d2e86a95c2db92fbd7d0155f97127bcb40"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f2fc11e8fe034ee3c34d316d0ad8808f45bc3b9ce5857ff29d513f3ff2923a1"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:586f8204935b9ec884500498ccc91aa869fc652c40c093bd9e1471fbcc25c022"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddc2f4dfd396c7bfa18e6ce371cba60e4cf9d2e5cdb71376aa2da264605b60b9"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ddcba87675b6d509139d1b521e0c8250e967e63b5909a7e8f8944d0f90ff36f"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7bd339195d84439cbe5771546fe8a4e8a7a045417d8f9de9a368c434e42a721e"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:d7c36232a90d4755b720fbd76739d8891732b18cf240a9c645d75f00639a9024"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6b0817e34942b2ca527b0e9298373e7cc75f429e8da2055607f4931fded23e20"}, - {file = "rpds_py-0.18.0-cp39-none-win32.whl", hash = "sha256:99f70b740dc04d09e6b2699b675874367885217a2e9f782bdf5395632ac663b7"}, - {file = "rpds_py-0.18.0-cp39-none-win_amd64.whl", hash = "sha256:6ef687afab047554a2d366e112dd187b62d261d49eb79b77e386f94644363294"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ad36cfb355e24f1bd37cac88c112cd7730873f20fb0bdaf8ba59eedf8216079f"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:36b3ee798c58ace201289024b52788161e1ea133e4ac93fba7d49da5fec0ef9e"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8a2f084546cc59ea99fda8e070be2fd140c3092dc11524a71aa8f0f3d5a55ca"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e4461d0f003a0aa9be2bdd1b798a041f177189c1a0f7619fe8c95ad08d9a45d7"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8db715ebe3bb7d86d77ac1826f7d67ec11a70dbd2376b7cc214199360517b641"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:793968759cd0d96cac1e367afd70c235867831983f876a53389ad869b043c948"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66e6a3af5a75363d2c9a48b07cb27c4ea542938b1a2e93b15a503cdfa8490795"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ef0befbb5d79cf32d0266f5cff01545602344eda89480e1dd88aca964260b18"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1d4acf42190d449d5e89654d5c1ed3a4f17925eec71f05e2a41414689cda02d1"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:a5f446dd5055667aabaee78487f2b5ab72e244f9bc0b2ffebfeec79051679984"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:9dbbeb27f4e70bfd9eec1be5477517365afe05a9b2c441a0b21929ee61048124"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:22806714311a69fd0af9b35b7be97c18a0fc2826e6827dbb3a8c94eac6cf7eeb"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b34ae4636dfc4e76a438ab826a0d1eed2589ca7d9a1b2d5bb546978ac6485461"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c8370641f1a7f0e0669ddccca22f1da893cef7628396431eb445d46d893e5cd"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c8362467a0fdeccd47935f22c256bec5e6abe543bf0d66e3d3d57a8fb5731863"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:11a8c85ef4a07a7638180bf04fe189d12757c696eb41f310d2426895356dcf05"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b316144e85316da2723f9d8dc75bada12fa58489a527091fa1d5a612643d1a0e"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf1ea2e34868f6fbf070e1af291c8180480310173de0b0c43fc38a02929fc0e3"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e546e768d08ad55b20b11dbb78a745151acbd938f8f00d0cfbabe8b0199b9880"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:4901165d170a5fde6f589acb90a6b33629ad1ec976d4529e769c6f3d885e3e80"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:618a3d6cae6ef8ec88bb76dd80b83cfe415ad4f1d942ca2a903bf6b6ff97a2da"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ed4eb745efbff0a8e9587d22a84be94a5eb7d2d99c02dacf7bd0911713ed14dd"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6c81e5f372cd0dc5dc4809553d34f832f60a46034a5f187756d9b90586c2c307"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:43fbac5f22e25bee1d482c97474f930a353542855f05c1161fd804c9dc74a09d"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d7faa6f14017c0b1e69f5e2c357b998731ea75a442ab3841c0dbbbfe902d2c4"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:08231ac30a842bd04daabc4d71fddd7e6d26189406d5a69535638e4dcb88fe76"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:044a3e61a7c2dafacae99d1e722cc2d4c05280790ec5a05031b3876809d89a5c"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3f26b5bd1079acdb0c7a5645e350fe54d16b17bfc5e71f371c449383d3342e17"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:482103aed1dfe2f3b71a58eff35ba105289b8d862551ea576bd15479aba01f66"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1374f4129f9bcca53a1bba0bb86bf78325a0374577cf7e9e4cd046b1e6f20e24"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:635dc434ff724b178cb192c70016cc0ad25a275228f749ee0daf0eddbc8183b1"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:bc362ee4e314870a70f4ae88772d72d877246537d9f8cb8f7eacf10884862432"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:4832d7d380477521a8c1644bbab6588dfedea5e30a7d967b5fb75977c45fd77f"}, - {file = "rpds_py-0.18.0.tar.gz", hash = "sha256:42821446ee7a76f5d9f71f9e33a4fb2ffd724bb3e7f93386150b61a43115788d"}, + {file = "rpds_py-0.20.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3ad0fda1635f8439cde85c700f964b23ed5fc2d28016b32b9ee5fe30da5c84e2"}, + {file = "rpds_py-0.20.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9bb4a0d90fdb03437c109a17eade42dfbf6190408f29b2744114d11586611d6f"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c6377e647bbfd0a0b159fe557f2c6c602c159fc752fa316572f012fc0bf67150"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb851b7df9dda52dc1415ebee12362047ce771fc36914586b2e9fcbd7d293b3e"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e0f80b739e5a8f54837be5d5c924483996b603d5502bfff79bf33da06164ee2"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a8c94dad2e45324fc74dce25e1645d4d14df9a4e54a30fa0ae8bad9a63928e3"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8e604fe73ba048c06085beaf51147eaec7df856824bfe7b98657cf436623daf"}, + {file = "rpds_py-0.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:df3de6b7726b52966edf29663e57306b23ef775faf0ac01a3e9f4012a24a4140"}, + {file = "rpds_py-0.20.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf258ede5bc22a45c8e726b29835b9303c285ab46fc7c3a4cc770736b5304c9f"}, + {file = "rpds_py-0.20.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:55fea87029cded5df854ca7e192ec7bdb7ecd1d9a3f63d5c4eb09148acf4a7ce"}, + {file = "rpds_py-0.20.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ae94bd0b2f02c28e199e9bc51485d0c5601f58780636185660f86bf80c89af94"}, + {file = "rpds_py-0.20.0-cp310-none-win32.whl", hash = "sha256:28527c685f237c05445efec62426d285e47a58fb05ba0090a4340b73ecda6dee"}, + {file = "rpds_py-0.20.0-cp310-none-win_amd64.whl", hash = "sha256:238a2d5b1cad28cdc6ed15faf93a998336eb041c4e440dd7f902528b8891b399"}, + {file = "rpds_py-0.20.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac2f4f7a98934c2ed6505aead07b979e6f999389f16b714448fb39bbaa86a489"}, + {file = "rpds_py-0.20.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:220002c1b846db9afd83371d08d239fdc865e8f8c5795bbaec20916a76db3318"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d7919548df3f25374a1f5d01fbcd38dacab338ef5f33e044744b5c36729c8db"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:758406267907b3781beee0f0edfe4a179fbd97c0be2e9b1154d7f0a1279cf8e5"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3d61339e9f84a3f0767b1995adfb171a0d00a1185192718a17af6e124728e0f5"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1259c7b3705ac0a0bd38197565a5d603218591d3f6cee6e614e380b6ba61c6f6"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c1dc0f53856b9cc9a0ccca0a7cc61d3d20a7088201c0937f3f4048c1718a209"}, + {file = "rpds_py-0.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7e60cb630f674a31f0368ed32b2a6b4331b8350d67de53c0359992444b116dd3"}, + {file = "rpds_py-0.20.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dbe982f38565bb50cb7fb061ebf762c2f254ca3d8c20d4006878766e84266272"}, + {file = "rpds_py-0.20.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:514b3293b64187172bc77c8fb0cdae26981618021053b30d8371c3a902d4d5ad"}, + {file = "rpds_py-0.20.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d0a26ffe9d4dd35e4dfdd1e71f46401cff0181c75ac174711ccff0459135fa58"}, + {file = "rpds_py-0.20.0-cp311-none-win32.whl", hash = "sha256:89c19a494bf3ad08c1da49445cc5d13d8fefc265f48ee7e7556839acdacf69d0"}, + {file = "rpds_py-0.20.0-cp311-none-win_amd64.whl", hash = "sha256:c638144ce971df84650d3ed0096e2ae7af8e62ecbbb7b201c8935c370df00a2c"}, + {file = "rpds_py-0.20.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a84ab91cbe7aab97f7446652d0ed37d35b68a465aeef8fc41932a9d7eee2c1a6"}, + {file = "rpds_py-0.20.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:56e27147a5a4c2c21633ff8475d185734c0e4befd1c989b5b95a5d0db699b21b"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2580b0c34583b85efec8c5c5ec9edf2dfe817330cc882ee972ae650e7b5ef739"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b80d4a7900cf6b66bb9cee5c352b2d708e29e5a37fe9bf784fa97fc11504bf6c"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50eccbf054e62a7b2209b28dc7a22d6254860209d6753e6b78cfaeb0075d7bee"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:49a8063ea4296b3a7e81a5dfb8f7b2d73f0b1c20c2af401fb0cdf22e14711a96"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea438162a9fcbee3ecf36c23e6c68237479f89f962f82dae83dc15feeceb37e4"}, + {file = "rpds_py-0.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:18d7585c463087bddcfa74c2ba267339f14f2515158ac4db30b1f9cbdb62c8ef"}, + {file = "rpds_py-0.20.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d4c7d1a051eeb39f5c9547e82ea27cbcc28338482242e3e0b7768033cb083821"}, + {file = "rpds_py-0.20.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e4df1e3b3bec320790f699890d41c59d250f6beda159ea3c44c3f5bac1976940"}, + {file = "rpds_py-0.20.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2cf126d33a91ee6eedc7f3197b53e87a2acdac63602c0f03a02dd69e4b138174"}, + {file = "rpds_py-0.20.0-cp312-none-win32.whl", hash = "sha256:8bc7690f7caee50b04a79bf017a8d020c1f48c2a1077ffe172abec59870f1139"}, + {file = "rpds_py-0.20.0-cp312-none-win_amd64.whl", hash = "sha256:0e13e6952ef264c40587d510ad676a988df19adea20444c2b295e536457bc585"}, + {file = "rpds_py-0.20.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:aa9a0521aeca7d4941499a73ad7d4f8ffa3d1affc50b9ea11d992cd7eff18a29"}, + {file = "rpds_py-0.20.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4a1f1d51eccb7e6c32ae89243cb352389228ea62f89cd80823ea7dd1b98e0b91"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a86a9b96070674fc88b6f9f71a97d2c1d3e5165574615d1f9168ecba4cecb24"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6c8ef2ebf76df43f5750b46851ed1cdf8f109d7787ca40035fe19fbdc1acc5a7"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b74b25f024b421d5859d156750ea9a65651793d51b76a2e9238c05c9d5f203a9"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57eb94a8c16ab08fef6404301c38318e2c5a32216bf5de453e2714c964c125c8"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1940dae14e715e2e02dfd5b0f64a52e8374a517a1e531ad9412319dc3ac7879"}, + {file = "rpds_py-0.20.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d20277fd62e1b992a50c43f13fbe13277a31f8c9f70d59759c88f644d66c619f"}, + {file = "rpds_py-0.20.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:06db23d43f26478303e954c34c75182356ca9aa7797d22c5345b16871ab9c45c"}, + {file = "rpds_py-0.20.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b2a5db5397d82fa847e4c624b0c98fe59d2d9b7cf0ce6de09e4d2e80f8f5b3f2"}, + {file = "rpds_py-0.20.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a35df9f5548fd79cb2f52d27182108c3e6641a4feb0f39067911bf2adaa3e57"}, + {file = "rpds_py-0.20.0-cp313-none-win32.whl", hash = "sha256:fd2d84f40633bc475ef2d5490b9c19543fbf18596dcb1b291e3a12ea5d722f7a"}, + {file = "rpds_py-0.20.0-cp313-none-win_amd64.whl", hash = "sha256:9bc2d153989e3216b0559251b0c260cfd168ec78b1fac33dd485750a228db5a2"}, + {file = "rpds_py-0.20.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:f2fbf7db2012d4876fb0d66b5b9ba6591197b0f165db8d99371d976546472a24"}, + {file = "rpds_py-0.20.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1e5f3cd7397c8f86c8cc72d5a791071431c108edd79872cdd96e00abd8497d29"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce9845054c13696f7af7f2b353e6b4f676dab1b4b215d7fe5e05c6f8bb06f965"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c3e130fd0ec56cb76eb49ef52faead8ff09d13f4527e9b0c400307ff72b408e1"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b16aa0107ecb512b568244ef461f27697164d9a68d8b35090e9b0c1c8b27752"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa7f429242aae2947246587d2964fad750b79e8c233a2367f71b554e9447949c"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af0fc424a5842a11e28956e69395fbbeab2c97c42253169d87e90aac2886d751"}, + {file = "rpds_py-0.20.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b8c00a3b1e70c1d3891f0db1b05292747f0dbcfb49c43f9244d04c70fbc40eb8"}, + {file = "rpds_py-0.20.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:40ce74fc86ee4645d0a225498d091d8bc61f39b709ebef8204cb8b5a464d3c0e"}, + {file = "rpds_py-0.20.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:4fe84294c7019456e56d93e8ababdad5a329cd25975be749c3f5f558abb48253"}, + {file = "rpds_py-0.20.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:338ca4539aad4ce70a656e5187a3a31c5204f261aef9f6ab50e50bcdffaf050a"}, + {file = "rpds_py-0.20.0-cp38-none-win32.whl", hash = "sha256:54b43a2b07db18314669092bb2de584524d1ef414588780261e31e85846c26a5"}, + {file = "rpds_py-0.20.0-cp38-none-win_amd64.whl", hash = "sha256:a1862d2d7ce1674cffa6d186d53ca95c6e17ed2b06b3f4c476173565c862d232"}, + {file = "rpds_py-0.20.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3fde368e9140312b6e8b6c09fb9f8c8c2f00999d1823403ae90cc00480221b22"}, + {file = "rpds_py-0.20.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9824fb430c9cf9af743cf7aaf6707bf14323fb51ee74425c380f4c846ea70789"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11ef6ce74616342888b69878d45e9f779b95d4bd48b382a229fe624a409b72c5"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c52d3f2f82b763a24ef52f5d24358553e8403ce05f893b5347098014f2d9eff2"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d35cef91e59ebbeaa45214861874bc6f19eb35de96db73e467a8358d701a96c"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d72278a30111e5b5525c1dd96120d9e958464316f55adb030433ea905866f4de"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4c29cbbba378759ac5786730d1c3cb4ec6f8ababf5c42a9ce303dc4b3d08cda"}, + {file = "rpds_py-0.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6632f2d04f15d1bd6fe0eedd3b86d9061b836ddca4c03d5cf5c7e9e6b7c14580"}, + {file = "rpds_py-0.20.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:d0b67d87bb45ed1cd020e8fbf2307d449b68abc45402fe1a4ac9e46c3c8b192b"}, + {file = "rpds_py-0.20.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ec31a99ca63bf3cd7f1a5ac9fe95c5e2d060d3c768a09bc1d16e235840861420"}, + {file = "rpds_py-0.20.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22e6c9976e38f4d8c4a63bd8a8edac5307dffd3ee7e6026d97f3cc3a2dc02a0b"}, + {file = "rpds_py-0.20.0-cp39-none-win32.whl", hash = "sha256:569b3ea770c2717b730b61998b6c54996adee3cef69fc28d444f3e7920313cf7"}, + {file = "rpds_py-0.20.0-cp39-none-win_amd64.whl", hash = "sha256:e6900ecdd50ce0facf703f7a00df12374b74bbc8ad9fe0f6559947fb20f82364"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:617c7357272c67696fd052811e352ac54ed1d9b49ab370261a80d3b6ce385045"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9426133526f69fcaba6e42146b4e12d6bc6c839b8b555097020e2b78ce908dcc"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:deb62214c42a261cb3eb04d474f7155279c1a8a8c30ac89b7dcb1721d92c3c02"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcaeb7b57f1a1e071ebd748984359fef83ecb026325b9d4ca847c95bc7311c92"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d454b8749b4bd70dd0a79f428731ee263fa6995f83ccb8bada706e8d1d3ff89d"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d807dc2051abe041b6649681dce568f8e10668e3c1c6543ebae58f2d7e617855"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3c20f0ddeb6e29126d45f89206b8291352b8c5b44384e78a6499d68b52ae511"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b7f19250ceef892adf27f0399b9e5afad019288e9be756d6919cb58892129f51"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:4f1ed4749a08379555cebf4650453f14452eaa9c43d0a95c49db50c18b7da075"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:dcedf0b42bcb4cfff4101d7771a10532415a6106062f005ab97d1d0ab5681c60"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:39ed0d010457a78f54090fafb5d108501b5aa5604cc22408fc1c0c77eac14344"}, + {file = "rpds_py-0.20.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:bb273176be34a746bdac0b0d7e4e2c467323d13640b736c4c477881a3220a989"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f918a1a130a6dfe1d7fe0f105064141342e7dd1611f2e6a21cd2f5c8cb1cfb3e"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f60012a73aa396be721558caa3a6fd49b3dd0033d1675c6d59c4502e870fcf0c"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d2b1ad682a3dfda2a4e8ad8572f3100f95fad98cb99faf37ff0ddfe9cbf9d03"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:614fdafe9f5f19c63ea02817fa4861c606a59a604a77c8cdef5aa01d28b97921"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa518bcd7600c584bf42e6617ee8132869e877db2f76bcdc281ec6a4113a53ab"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f0475242f447cc6cb8a9dd486d68b2ef7fbee84427124c232bff5f63b1fe11e5"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f90a4cd061914a60bd51c68bcb4357086991bd0bb93d8aa66a6da7701370708f"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:def7400461c3a3f26e49078302e1c1b38f6752342c77e3cf72ce91ca69fb1bc1"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:65794e4048ee837494aea3c21a28ad5fc080994dfba5b036cf84de37f7ad5074"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:faefcc78f53a88f3076b7f8be0a8f8d35133a3ecf7f3770895c25f8813460f08"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:5b4f105deeffa28bbcdff6c49b34e74903139afa690e35d2d9e3c2c2fba18cec"}, + {file = "rpds_py-0.20.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fdfc3a892927458d98f3d55428ae46b921d1f7543b89382fdb483f5640daaec8"}, + {file = "rpds_py-0.20.0.tar.gz", hash = "sha256:d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121"}, ] [[package]] @@ -978,24 +983,24 @@ files = [ [[package]] name = "tomli" -version = "2.0.1" +version = "2.0.2" description = "A lil' TOML parser" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, + {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, + {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, ] [[package]] name = "typing-extensions" -version = "4.9.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, - {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] @@ -1014,13 +1019,13 @@ six = "*" [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] @@ -1108,22 +1113,7 @@ files = [ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] -[[package]] -name = "zipp" -version = "3.17.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] - [metadata] lock-version = "2.0" -python-versions = "^3.8" -content-hash = "fddd54f2e38fdce32a4236c283d5f4e141f897e6d7ed4aac4ce5dbb40c37e428" +python-versions = "^3.9" +content-hash = "1b1e8101fbf36d25f1b0e8396baae3198edeb413eed82b5dda8da492264375c5" diff --git a/pyproject.toml b/pyproject.toml index b50cba65..0bc7cbe2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ comparefiles = "linkml_runtime.utils.comparefiles:cli" linkml-normalize = "linkml_runtime.processing.referencevalidator:cli" [tool.poetry.dependencies] -python = "^3.8" +python = "^3.9" click = "*" deprecated = "*" hbreader = "*" @@ -62,6 +62,14 @@ prefixmaps = ">=0.1.4" curies = ">=0.5.4" pydantic = ">=1.10.2, <3.0.0" +[tool.ruff] +line-length = 120 +select = [ + "F401", + "UP" +] +target-version = "py39" + [tool.poetry.dev-dependencies] coverage = "^6.2" requests-cache = "^1.2.0" diff --git a/tests/support/clicktestcase.py b/tests/support/clicktestcase.py index fe14b62d..a35a35dc 100644 --- a/tests/support/clicktestcase.py +++ b/tests/support/clicktestcase.py @@ -1,7 +1,7 @@ import os import shlex import unittest -from typing import Union, List, Optional, Callable +from typing import Union, Optional, Callable from warnings import warn from tests.support.dirutils import make_and_clear_directory @@ -86,7 +86,7 @@ def closein_comparison(expected_txt: str, actual_txt: str) -> None: print(nw[offset:offset+view+view]) def do_test(self, - args: Union[str, List[str]], + args: Union[str, list[str]], testFileOrDirectory: Optional[str] = None, *, expected_error: type(Exception) = None, diff --git a/tests/support/dirutils.py b/tests/support/dirutils.py index 26865bce..7b68f256 100644 --- a/tests/support/dirutils.py +++ b/tests/support/dirutils.py @@ -14,7 +14,7 @@ def make_and_clear_directory(dirbase: str) -> None: safety_file = os.path.join(dirbase, "generated") if os.path.exists(dirbase): if not os.path.exists(safety_file): - raise FileNotFoundError("'generated' guard file not found in {}".format(safety_file)) + raise FileNotFoundError(f"'generated' guard file not found in {safety_file}") shutil.rmtree(dirbase) os.makedirs(dirbase) with open(os.path.join(dirbase, "generated"), "w") as f: diff --git a/tests/support/mismatchlog.py b/tests/support/mismatchlog.py index 0523c161..c51fb47d 100644 --- a/tests/support/mismatchlog.py +++ b/tests/support/mismatchlog.py @@ -1,7 +1,6 @@ import os import sys -from dataclasses import dataclass -from typing import Optional, List +from typing import Optional base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) @@ -44,7 +43,7 @@ def __str__(self): return '\n'.join(rval) + '\n' def __init__(self) -> None: - self.entries: List[MismatchLog.MismatchLogEntry] = list() + self.entries: list[MismatchLog.MismatchLogEntry] = list() def log(self, file_or_directory: str, message: Optional[str] = None) -> None: self.entries.append(MismatchLog.MismatchLogEntry(file_or_directory, message)) diff --git a/tests/support/test_environment.py b/tests/support/test_environment.py index e04e4eac..8bebdbac 100644 --- a/tests/support/test_environment.py +++ b/tests/support/test_environment.py @@ -9,7 +9,7 @@ from importlib import import_module from io import StringIO from pathlib import Path -from typing import Optional, Callable, Union, List +from typing import Optional, Callable, Union from tests.support.dirutils import are_dir_trees_equal from tests.support.mismatchlog import MismatchLog @@ -159,14 +159,14 @@ def make_testing_directory(directory: str, clear: bool = False) -> None: with open(safety_file, "w") as f: f.write("Generated for safety. Directory will not be cleared if this file is not present") - def generate_directory(self, dirname: Union[str, List[str]], generator: Callable[[str], None]) -> None: + def generate_directory(self, dirname: Union[str, list[str]], generator: Callable[[str], None]) -> None: """ Invoke the generator and compare the output in a temp directory to the output directory. Report the results and then update the output directory :param dirname: relative directory name (e.g. gengolr/meta) :param generator: function to create the output. First argument is the target directory """ - dirname = dirname if isinstance(dirname, List) else [dirname] + dirname = dirname if isinstance(dirname, list) else [dirname] temp_output_directory = self.make_temp_dir(*dirname) expected_output_directory = self.expected_path(*dirname) self.make_testing_directory(expected_output_directory) @@ -182,7 +182,7 @@ def generate_directory(self, dirname: Union[str, List[str]], generator: Callable else: shutil.rmtree(temp_output_directory) - def generate_single_file(self, filename: Union[str, List[str]], generator: Callable[[Optional[str]], Optional[str]], + def generate_single_file(self, filename: Union[str, list[str]], generator: Callable[[Optional[str]], Optional[str]], value_is_returned: bool = False, filtr: Callable[[str], str] = None, comparator: Callable[[str, str], str] = None, use_testing_root: bool = False) -> str: """ @@ -198,7 +198,7 @@ def generate_single_file(self, filename: Union[str, List[str]], generator: Calla # If no filter, default to identity function if not filtr: filtr = lambda s: s - filename = filename if isinstance(filename, List) else [filename] + filename = filename if isinstance(filename, list) else [filename] actual_file = self.root_temp_file_path(*filename) if use_testing_root else self.actual_path(*filename) expected_file = self.root_expected_path(*filename) if use_testing_root else self.expected_path(*filename) diff --git a/tests/test_index/model/container_test.py b/tests/test_index/model/container_test.py index 23d1f84a..1dc73f10 100644 --- a/tests/test_index/model/container_test.py +++ b/tests/test_index/model/container_test.py @@ -7,22 +7,19 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Boolean, Date, Float, Integer, String from linkml_runtime.utils.metamodelcore import Bool, XSDDate metamodel_version = "1.7.0" @@ -85,7 +82,7 @@ class NamedThing(YAMLRoot): """ A generic grouping for any identifiable entity """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.NamedThing class_class_curie: ClassVar[str] = "personinfo:NamedThing" @@ -97,7 +94,7 @@ class NamedThing(YAMLRoot): description: Optional[str] = None image: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, NamedThingId): @@ -120,7 +117,7 @@ class Person(NamedThing): """ A person (alive, dead, undead, or fictional). """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Person class_class_curie: ClassVar[str] = "schema:Person" @@ -133,12 +130,12 @@ class Person(NamedThing): age_in_years: Optional[int] = None gender: Optional[Union[str, "GenderType"]] = None current_address: Optional[Union[dict, "Address"]] = None - has_employment_history: Optional[Union[Union[dict, "EmploymentEvent"], List[Union[dict, "EmploymentEvent"]]]] = empty_list() - has_familial_relationships: Optional[Union[Union[dict, "FamilialRelationship"], List[Union[dict, "FamilialRelationship"]]]] = empty_list() - has_medical_history: Optional[Union[Union[dict, "MedicalEvent"], List[Union[dict, "MedicalEvent"]]]] = empty_list() - aliases: Optional[Union[str, List[str]]] = empty_list() + has_employment_history: Optional[Union[Union[dict, "EmploymentEvent"], list[Union[dict, "EmploymentEvent"]]]] = empty_list() + has_familial_relationships: Optional[Union[Union[dict, "FamilialRelationship"], list[Union[dict, "FamilialRelationship"]]]] = empty_list() + has_medical_history: Optional[Union[Union[dict, "MedicalEvent"], list[Union[dict, "MedicalEvent"]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PersonId): @@ -183,16 +180,16 @@ class HasAliases(YAMLRoot): """ A mixin applied to any class that can have aliases/alternateNames """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.HasAliases class_class_curie: ClassVar[str] = "personinfo:HasAliases" class_name: ClassVar[str] = "HasAliases" class_model_uri: ClassVar[URIRef] = PERSONINFO.HasAliases - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.aliases, list): self.aliases = [self.aliases] if self.aliases is not None else [] self.aliases = [v if isinstance(v, str) else str(v) for v in self.aliases] @@ -205,7 +202,7 @@ class Organization(NamedThing): """ An organization such as a company or university """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Organization class_class_curie: ClassVar[str] = "schema:Organization" @@ -216,9 +213,9 @@ class Organization(NamedThing): mission_statement: Optional[str] = None founding_date: Optional[str] = None founding_location: Optional[Union[str, PlaceId]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, OrganizationId): @@ -242,7 +239,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Place(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Place class_class_curie: ClassVar[str] = "personinfo:Place" @@ -251,9 +248,9 @@ class Place(YAMLRoot): id: Union[str, PlaceId] = None name: Optional[str] = None - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PlaceId): @@ -271,7 +268,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Address(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.PostalAddress class_class_curie: ClassVar[str] = "schema:PostalAddress" @@ -282,7 +279,7 @@ class Address(YAMLRoot): city: Optional[str] = None postal_code: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.street is not None and not isinstance(self.street, str): self.street = str(self.street) @@ -297,7 +294,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Event(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Event class_class_curie: ClassVar[str] = "personinfo:Event" @@ -309,7 +306,7 @@ class Event(YAMLRoot): duration: Optional[float] = None is_current: Optional[Union[bool, Bool]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.started_at_time is not None and not isinstance(self.started_at_time, XSDDate): self.started_at_time = XSDDate(self.started_at_time) @@ -327,7 +324,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Concept(NamedThing): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Concept class_class_curie: ClassVar[str] = "personinfo:Concept" @@ -336,7 +333,7 @@ class Concept(NamedThing): id: Union[str, ConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ConceptId): @@ -347,7 +344,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class DiagnosisConcept(Concept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.DiagnosisConcept class_class_curie: ClassVar[str] = "personinfo:DiagnosisConcept" @@ -356,7 +353,7 @@ class DiagnosisConcept(Concept): id: Union[str, DiagnosisConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, DiagnosisConceptId): @@ -367,7 +364,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ProcedureConcept(Concept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.ProcedureConcept class_class_curie: ClassVar[str] = "personinfo:ProcedureConcept" @@ -376,7 +373,7 @@ class ProcedureConcept(Concept): id: Union[str, ProcedureConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ProcedureConceptId): @@ -387,7 +384,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Relationship(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Relationship class_class_curie: ClassVar[str] = "personinfo:Relationship" @@ -398,7 +395,7 @@ class Relationship(YAMLRoot): ended_at_time: Optional[Union[str, XSDDate]] = None related_to: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.started_at_time is not None and not isinstance(self.started_at_time, XSDDate): self.started_at_time = XSDDate(self.started_at_time) @@ -413,7 +410,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class FamilialRelationship(Relationship): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.FamilialRelationship class_class_curie: ClassVar[str] = "personinfo:FamilialRelationship" @@ -423,7 +420,7 @@ class FamilialRelationship(Relationship): type: Union[str, "FamilialRelationshipType"] = None related_to: Union[str, PersonId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.type): self.MissingRequiredField("type") if not isinstance(self.type, FamilialRelationshipType): @@ -439,7 +436,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class EmploymentEvent(Event): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.EmploymentEvent class_class_curie: ClassVar[str] = "personinfo:EmploymentEvent" @@ -449,7 +446,7 @@ class EmploymentEvent(Event): employed_at: Optional[Union[str, OrganizationId]] = None type: Optional[Union[str, "RelationshipType"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.employed_at is not None and not isinstance(self.employed_at, OrganizationId): self.employed_at = OrganizationId(self.employed_at) @@ -461,7 +458,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class MedicalEvent(Event): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.MedicalEvent class_class_curie: ClassVar[str] = "personinfo:MedicalEvent" @@ -473,7 +470,7 @@ class MedicalEvent(Event): procedure: Optional[Union[dict, ProcedureConcept]] = None type: Optional[Union[str, "RelationshipType"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.in_location is not None and not isinstance(self.in_location, PlaceId): self.in_location = PlaceId(self.in_location) @@ -491,7 +488,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class WithLocation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.WithLocation class_class_curie: ClassVar[str] = "personinfo:WithLocation" @@ -500,7 +497,7 @@ class WithLocation(YAMLRoot): in_location: Optional[Union[str, PlaceId]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.in_location is not None and not isinstance(self.in_location, PlaceId): self.in_location = PlaceId(self.in_location) @@ -509,17 +506,17 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Container class_class_curie: ClassVar[str] = "personinfo:Container" class_name: ClassVar[str] = "Container" class_model_uri: ClassVar[URIRef] = PERSONINFO.Container - persons: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() - organizations: Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]] = empty_dict() + persons: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() + organizations: Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_list(slot_name="persons", slot_type=Person, key_name="id", keyed=True) self._normalize_inlined_as_list(slot_name="organizations", slot_type=Organization, key_name="id", keyed=True) @@ -614,13 +611,13 @@ class slots: model_uri=PERSONINFO.is_current, domain=None, range=Optional[Union[bool, Bool]]) slots.has_employment_history = Slot(uri=PERSONINFO.has_employment_history, name="has_employment_history", curie=PERSONINFO.curie('has_employment_history'), - model_uri=PERSONINFO.has_employment_history, domain=None, range=Optional[Union[Union[dict, EmploymentEvent], List[Union[dict, EmploymentEvent]]]]) + model_uri=PERSONINFO.has_employment_history, domain=None, range=Optional[Union[Union[dict, EmploymentEvent], list[Union[dict, EmploymentEvent]]]]) slots.has_medical_history = Slot(uri=PERSONINFO.has_medical_history, name="has_medical_history", curie=PERSONINFO.curie('has_medical_history'), - model_uri=PERSONINFO.has_medical_history, domain=None, range=Optional[Union[Union[dict, MedicalEvent], List[Union[dict, MedicalEvent]]]]) + model_uri=PERSONINFO.has_medical_history, domain=None, range=Optional[Union[Union[dict, MedicalEvent], list[Union[dict, MedicalEvent]]]]) slots.has_familial_relationships = Slot(uri=PERSONINFO.has_familial_relationships, name="has_familial_relationships", curie=PERSONINFO.curie('has_familial_relationships'), - model_uri=PERSONINFO.has_familial_relationships, domain=None, range=Optional[Union[Union[dict, FamilialRelationship], List[Union[dict, FamilialRelationship]]]]) + model_uri=PERSONINFO.has_familial_relationships, domain=None, range=Optional[Union[Union[dict, FamilialRelationship], list[Union[dict, FamilialRelationship]]]]) slots.in_location = Slot(uri=PERSONINFO.in_location, name="in_location", curie=PERSONINFO.curie('in_location'), model_uri=PERSONINFO.in_location, domain=None, range=Optional[Union[str, PlaceId]]) @@ -671,13 +668,13 @@ class slots: model_uri=PERSONINFO.ended_at_time, domain=None, range=Optional[Union[str, XSDDate]]) slots.persons = Slot(uri=PERSONINFO.persons, name="persons", curie=PERSONINFO.curie('persons'), - model_uri=PERSONINFO.persons, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.persons, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) slots.organizations = Slot(uri=PERSONINFO.organizations, name="organizations", curie=PERSONINFO.curie('organizations'), - model_uri=PERSONINFO.organizations, domain=None, range=Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]]) + model_uri=PERSONINFO.organizations, domain=None, range=Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]]) slots.hasAliases__aliases = Slot(uri=PERSONINFO.aliases, name="hasAliases__aliases", curie=PERSONINFO.curie('aliases'), - model_uri=PERSONINFO.hasAliases__aliases, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PERSONINFO.hasAliases__aliases, domain=None, range=Optional[Union[str, list[str]]]) slots.Person_primary_email = Slot(uri=SCHEMA.email, name="Person_primary_email", curie=SCHEMA.curie('email'), model_uri=PERSONINFO.Person_primary_email, domain=Person, range=Optional[str], diff --git a/tests/test_index/test_object_index.py b/tests/test_index/test_object_index.py index 1b8c4764..ea2d5e6e 100644 --- a/tests/test_index/test_object_index.py +++ b/tests/test_index/test_object_index.py @@ -5,7 +5,7 @@ from linkml_runtime.loaders import yaml_loader import tests.test_index.model.container_test as src_dm from linkml_runtime.index.object_index import ObjectIndex, ProxyObject -from linkml_runtime.utils.inference_utils import infer_all_slot_values, infer_slot_value, Config +from linkml_runtime.utils.inference_utils import infer_slot_value, Config from tests.test_index import INPUT_DIR SCHEMA = os.path.join(INPUT_DIR, 'container_test.yaml') diff --git a/tests/test_issues/input/issue_355.py b/tests/test_issues/input/issue_355.py index b5117559..ecf17ce3 100644 --- a/tests/test_issues/input/issue_355.py +++ b/tests/test_issues/input/issue_355.py @@ -7,19 +7,14 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE @@ -43,16 +38,16 @@ class ContaineeId(URIorCURIE): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCT.Container class_class_curie: ClassVar[str] = "sct:Container" class_name: ClassVar[str] = "container" class_model_uri: ClassVar[URIRef] = SCT.Container - entry: Optional[Union[Dict[Union[str, ContaineeId], Union[dict, "Containee"]], List[Union[dict, "Containee"]]]] = empty_dict() + entry: Optional[Union[dict[Union[str, ContaineeId], Union[dict, "Containee"]], list[Union[dict, "Containee"]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="entry", slot_type=Containee, key_name="id", keyed=True) super().__post_init__(**kwargs) @@ -60,7 +55,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Containee(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCT.Containee class_class_curie: ClassVar[str] = "sct:Containee" @@ -70,7 +65,7 @@ class Containee(YAMLRoot): id: Union[str, ContaineeId] = None value: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is None: raise ValueError("id must be supplied") if not isinstance(self.id, ContaineeId): @@ -90,7 +85,7 @@ class slots: pass slots.container__entry = Slot(uri=SCT.entry, name="container__entry", curie=SCT.curie('entry'), - model_uri=SCT.container__entry, domain=None, range=Optional[Union[Dict[Union[str, ContaineeId], Union[dict, Containee]], List[Union[dict, Containee]]]]) + model_uri=SCT.container__entry, domain=None, range=Optional[Union[dict[Union[str, ContaineeId], Union[dict, Containee]], list[Union[dict, Containee]]]]) slots.containee__id = Slot(uri=SCT.id, name="containee__id", curie=SCT.curie('id'), model_uri=SCT.containee__id, domain=None, range=URIRef) diff --git a/tests/test_issues/input/issue_368.py b/tests/test_issues/input/issue_368.py index 3632d13b..0f02158d 100644 --- a/tests/test_issues/input/issue_368.py +++ b/tests/test_issues/input/issue_368.py @@ -7,18 +7,12 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from .issue_368_imports import ParentClass, SampleEnum @@ -40,7 +34,7 @@ @dataclass class SampleClass(ParentClass): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/SampleClass") class_class_curie: ClassVar[str] = None @@ -49,7 +43,7 @@ class SampleClass(ParentClass): slot_1: Optional[Union[str, "SampleEnum"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.slot_1 is not None and not isinstance(self.slot_1, SampleEnum): self.slot_1 = SampleEnum(self.slot_1) diff --git a/tests/test_issues/input/issue_368_imports.py b/tests/test_issues/input/issue_368_imports.py index 828a5ec2..e15bdb15 100644 --- a/tests/test_issues/input/issue_368_imports.py +++ b/tests/test_issues/input/issue_368_imports.py @@ -7,19 +7,13 @@ # license: import dataclasses -import sys -import re -from typing import Optional, List, Union, Dict, ClassVar, Any -from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions - -from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from typing import ClassVar +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue + +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -39,7 +33,7 @@ class ParentClass(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/mixs/ParentClass") class_class_curie: ClassVar[str] = None diff --git a/tests/test_issues/models/linkml_issue_576.py b/tests/test_issues/models/linkml_issue_576.py index 81fb80c7..89a1f39d 100644 --- a/tests/test_issues/models/linkml_issue_576.py +++ b/tests/test_issues/models/linkml_issue_576.py @@ -7,22 +7,16 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import String, Uriorcurie +from linkml_runtime.linkml_model.types import String from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" @@ -64,7 +58,7 @@ class OrganizationId(Code): @dataclass class Person(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Person class_class_curie: ClassVar[str] = "schema:Person" @@ -73,9 +67,9 @@ class Person(YAMLRoot): id: Union[str, PersonId] = None name: Optional[str] = None - friends: Optional[Union[Union[str, PersonId], List[Union[str, PersonId]]]] = empty_list() + friends: Optional[Union[Union[str, PersonId], list[Union[str, PersonId]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PersonId): @@ -93,7 +87,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Pet(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Pet class_class_curie: ClassVar[str] = "personinfo:Pet" @@ -104,7 +98,7 @@ class Pet(YAMLRoot): name: Optional[str] = None owner: Optional[Union[str, PersonId]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PetId): @@ -121,7 +115,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Organization(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Organization class_class_curie: ClassVar[str] = "schema:Organization" @@ -130,9 +124,9 @@ class Organization(YAMLRoot): id: Union[str, OrganizationId] = None name: Optional[str] = None - part_of: Optional[Union[Union[str, OrganizationId], List[Union[str, OrganizationId]]]] = empty_list() + part_of: Optional[Union[Union[str, OrganizationId], list[Union[str, OrganizationId]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, OrganizationId): @@ -150,7 +144,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Dataset(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Dataset class_class_curie: ClassVar[str] = "personinfo:Dataset" @@ -158,11 +152,11 @@ class Dataset(YAMLRoot): class_model_uri: ClassVar[URIRef] = PERSONINFO.Dataset source: Optional[Union[str, URIorCURIE]] = None - persons: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() - organizations: Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]] = empty_dict() - pets: Optional[Union[Dict[Union[str, PetId], Union[dict, Pet]], List[Union[dict, Pet]]]] = empty_dict() + persons: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() + organizations: Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]] = empty_dict() + pets: Optional[Union[dict[Union[str, PetId], Union[dict, Pet]], list[Union[dict, Pet]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.source is not None and not isinstance(self.source, URIorCURIE): self.source = URIorCURIE(self.source) @@ -189,7 +183,7 @@ class slots: model_uri=PERSONINFO.person__name, domain=None, range=Optional[str]) slots.person__friends = Slot(uri=PERSONINFO.friends, name="person__friends", curie=PERSONINFO.curie('friends'), - model_uri=PERSONINFO.person__friends, domain=None, range=Optional[Union[Union[str, PersonId], List[Union[str, PersonId]]]]) + model_uri=PERSONINFO.person__friends, domain=None, range=Optional[Union[Union[str, PersonId], list[Union[str, PersonId]]]]) slots.pet__id = Slot(uri=PERSONINFO.id, name="pet__id", curie=PERSONINFO.curie('id'), model_uri=PERSONINFO.pet__id, domain=None, range=URIRef) @@ -207,16 +201,16 @@ class slots: model_uri=PERSONINFO.organization__name, domain=None, range=Optional[str]) slots.organization__part_of = Slot(uri=PERSONINFO.part_of, name="organization__part_of", curie=PERSONINFO.curie('part_of'), - model_uri=PERSONINFO.organization__part_of, domain=None, range=Optional[Union[Union[str, OrganizationId], List[Union[str, OrganizationId]]]]) + model_uri=PERSONINFO.organization__part_of, domain=None, range=Optional[Union[Union[str, OrganizationId], list[Union[str, OrganizationId]]]]) slots.dataset__source = Slot(uri=PERSONINFO.source, name="dataset__source", curie=PERSONINFO.curie('source'), model_uri=PERSONINFO.dataset__source, domain=None, range=Optional[Union[str, URIorCURIE]]) slots.dataset__persons = Slot(uri=PERSONINFO.persons, name="dataset__persons", curie=PERSONINFO.curie('persons'), - model_uri=PERSONINFO.dataset__persons, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.dataset__persons, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) slots.dataset__organizations = Slot(uri=PERSONINFO.organizations, name="dataset__organizations", curie=PERSONINFO.curie('organizations'), - model_uri=PERSONINFO.dataset__organizations, domain=None, range=Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]]) + model_uri=PERSONINFO.dataset__organizations, domain=None, range=Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]]) slots.dataset__pets = Slot(uri=PERSONINFO.pets, name="dataset__pets", curie=PERSONINFO.curie('pets'), - model_uri=PERSONINFO.dataset__pets, domain=None, range=Optional[Union[Dict[Union[str, PetId], Union[dict, Pet]], List[Union[dict, Pet]]]]) + model_uri=PERSONINFO.dataset__pets, domain=None, range=Optional[Union[dict[Union[str, PetId], Union[dict, Pet]], list[Union[dict, Pet]]]]) diff --git a/tests/test_issues/models/model_817.py b/tests/test_issues/models/model_817.py index ce6ac68f..f9ca3298 100644 --- a/tests/test_issues/models/model_817.py +++ b/tests/test_issues/models/model_817.py @@ -7,22 +7,18 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import String metamodel_version = "1.7.0" version = None @@ -49,7 +45,7 @@ class PersonId(extended_str): @dataclass class Person(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Person class_class_curie: ClassVar[str] = "personinfo:Person" @@ -60,7 +56,7 @@ class Person(YAMLRoot): name: Optional[str] = None vital_status: Optional[Union[str, "VitalStatusEnum"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PersonId): @@ -77,7 +73,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class PersonNoId(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.PersonNoId class_class_curie: ClassVar[str] = "personinfo:PersonNoId" @@ -87,7 +83,7 @@ class PersonNoId(YAMLRoot): name: Optional[str] = None vital_status: Optional[Union[str, "VitalStatusEnum"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.name is not None and not isinstance(self.name, str): self.name = str(self.name) @@ -99,7 +95,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Container class_class_curie: ClassVar[str] = "personinfo:Container" @@ -107,13 +103,13 @@ class Container(YAMLRoot): class_model_uri: ClassVar[URIRef] = PERSONINFO.Container name: Optional[str] = None - persons_as_list: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() - persons_as_dict: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() + persons_as_list: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() + persons_as_dict: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() single_person_inlined: Optional[Union[dict, Person]] = None - noidobj_as_list: Optional[Union[Union[dict, PersonNoId], List[Union[dict, PersonNoId]]]] = empty_list() + noidobj_as_list: Optional[Union[Union[dict, PersonNoId], list[Union[dict, PersonNoId]]]] = empty_list() single_noidobj_inlined: Optional[Union[dict, PersonNoId]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.name is not None and not isinstance(self.name, str): self.name = str(self.name) @@ -155,16 +151,16 @@ class slots: model_uri=PERSONINFO.name, domain=None, range=Optional[str]) slots.persons_as_list = Slot(uri=PERSONINFO.persons_as_list, name="persons_as_list", curie=PERSONINFO.curie('persons_as_list'), - model_uri=PERSONINFO.persons_as_list, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.persons_as_list, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) slots.persons_as_dict = Slot(uri=PERSONINFO.persons_as_dict, name="persons_as_dict", curie=PERSONINFO.curie('persons_as_dict'), - model_uri=PERSONINFO.persons_as_dict, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.persons_as_dict, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) slots.single_person_inlined = Slot(uri=PERSONINFO.single_person_inlined, name="single_person_inlined", curie=PERSONINFO.curie('single_person_inlined'), model_uri=PERSONINFO.single_person_inlined, domain=None, range=Optional[Union[dict, Person]]) slots.noidobj_as_list = Slot(uri=PERSONINFO.noidobj_as_list, name="noidobj_as_list", curie=PERSONINFO.curie('noidobj_as_list'), - model_uri=PERSONINFO.noidobj_as_list, domain=None, range=Optional[Union[Union[dict, PersonNoId], List[Union[dict, PersonNoId]]]]) + model_uri=PERSONINFO.noidobj_as_list, domain=None, range=Optional[Union[Union[dict, PersonNoId], list[Union[dict, PersonNoId]]]]) slots.single_noidobj_inlined = Slot(uri=PERSONINFO.single_noidobj_inlined, name="single_noidobj_inlined", curie=PERSONINFO.curie('single_noidobj_inlined'), model_uri=PERSONINFO.single_noidobj_inlined, domain=None, range=Optional[Union[dict, PersonNoId]]) diff --git a/tests/test_issues/test_issue_1040.py b/tests/test_issues/test_issue_1040.py index d51d1352..a2a0d770 100644 --- a/tests/test_issues/test_issue_1040.py +++ b/tests/test_issues/test_issue_1040.py @@ -1,4 +1,3 @@ -import sys from unittest import TestCase import yaml.constructor diff --git a/tests/test_issues/test_issue_355.py b/tests/test_issues/test_issue_355.py index a1dc7872..a2032ff7 100644 --- a/tests/test_issues/test_issue_355.py +++ b/tests/test_issues/test_issue_355.py @@ -7,19 +7,15 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re from jsonasobj2 import JsonObj -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE @@ -43,16 +39,16 @@ class ContaineeId(URIorCURIE): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCT.Container class_class_curie: ClassVar[str] = "sct:Container" class_name: ClassVar[str] = "container" class_model_uri: ClassVar[URIRef] = SCT.Container - entry: Optional[Union[Dict[Union[str, ContaineeId], Union[dict, "Containee"]], List[Union[dict, "Containee"]]]] = empty_dict() + entry: Optional[Union[dict[Union[str, ContaineeId], Union[dict, "Containee"]], list[Union[dict, "Containee"]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.entry, (list, dict, JsonObj)): self.entry = [self.entry] self._normalize_inlined_as_dict(slot_name="entry", slot_type=Containee, key_name="id", keyed=True) @@ -62,7 +58,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Containee(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCT.Containee class_class_curie: ClassVar[str] = "sct:Containee" @@ -72,7 +68,7 @@ class Containee(YAMLRoot): id: Union[str, ContaineeId] = None value: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is None: raise ValueError("id must be supplied") if not isinstance(self.id, ContaineeId): @@ -92,7 +88,7 @@ class slots: pass slots.container__entry = Slot(uri=SCT.entry, name="container__entry", curie=SCT.curie('entry'), - model_uri=SCT.container__entry, domain=None, range=Optional[Union[Dict[Union[str, ContaineeId], Union[dict, Containee]], List[Union[dict, Containee]]]]) + model_uri=SCT.container__entry, domain=None, range=Optional[Union[dict[Union[str, ContaineeId], Union[dict, Containee]], list[Union[dict, Containee]]]]) slots.containee__id = Slot(uri=SCT.id, name="containee__id", curie=SCT.curie('id'), model_uri=SCT.containee__id, domain=None, range=URIRef) diff --git a/tests/test_issues/test_issue_718a.py b/tests/test_issues/test_issue_718a.py index b5710e20..ad6e9dc0 100644 --- a/tests/test_issues/test_issue_718a.py +++ b/tests/test_issues/test_issue_718a.py @@ -1,4 +1,3 @@ -import dataclasses import unittest from dataclasses import dataclass from typing import Optional, ClassVar diff --git a/tests/test_issues/test_issue_8.py b/tests/test_issues/test_issue_8.py index cb8ca996..c9167743 100644 --- a/tests/test_issues/test_issue_8.py +++ b/tests/test_issues/test_issue_8.py @@ -1,5 +1,4 @@ import unittest -from typing import Type from linkml_runtime.linkml_model import SchemaDefinition, SlotDefinition, ClassDefinition from linkml_runtime.loaders import yaml_loader @@ -7,7 +6,7 @@ from tests.test_issues.environment import env -def override(cls: Type[YAMLRoot]): +def override(cls: type[YAMLRoot]): orig = cls.MissingRequiredField def mrf(self, field_name: str) -> None: if isinstance(self, SchemaDefinition) and field_name == "name" and self.id: diff --git a/tests/test_issues/test_linkml_issue_1126.py b/tests/test_issues/test_linkml_issue_1126.py index fd69c1dd..93be1f6d 100644 --- a/tests/test_issues/test_linkml_issue_1126.py +++ b/tests/test_issues/test_linkml_issue_1126.py @@ -1,4 +1,3 @@ -import logging import unittest from unittest import TestCase from linkml_runtime.utils.schemaview import SchemaView diff --git a/tests/test_issues/test_linkml_issue_1143.py b/tests/test_issues/test_linkml_issue_1143.py index e0ec799c..24e163b8 100644 --- a/tests/test_issues/test_linkml_issue_1143.py +++ b/tests/test_issues/test_linkml_issue_1143.py @@ -1,7 +1,5 @@ -import logging import unittest from copy import deepcopy -from typing import List, Tuple from unittest import TestCase from linkml_runtime.linkml_model import SchemaDefinition, ClassDefinition, SlotDefinition, EnumDefinition, TypeDefinition, Prefix, \ @@ -22,12 +20,12 @@ def make_schema(name: str, - prefixes: List[Prefix] = None, - classes: List[ClassDefinition] = None, - slots: List[SlotDefinition] = None, - enums: List[EnumDefinition] = None, - types: List[TypeDefinition] = None, - subsets: List[SubsetDefinition] = None, + prefixes: list[Prefix] = None, + classes: list[ClassDefinition] = None, + slots: list[SlotDefinition] = None, + enums: list[EnumDefinition] = None, + types: list[TypeDefinition] = None, + subsets: list[SubsetDefinition] = None, ) -> SchemaDefinition: """ Make a schema with the given elements @@ -148,7 +146,7 @@ def test_merge_schema(self): for k, vs in EXPECTED.items(): self.assertCountEqual(getattr(self.sv2.schema, k).keys(), vs, f'{k} keys not equal') - def _get_clobbered_field_val(self, element: str) -> Tuple[str, str]: + def _get_clobbered_field_val(self, element: str) -> tuple[str, str]: if element == 'prefixes': return 'prefix_reference', 'http://example.org/clobbered' else: diff --git a/tests/test_issues/test_linkml_issue_478.py b/tests/test_issues/test_linkml_issue_478.py index 67f5de75..96a3ce6c 100644 --- a/tests/test_issues/test_linkml_issue_478.py +++ b/tests/test_issues/test_linkml_issue_478.py @@ -1,4 +1,3 @@ -import logging import unittest from unittest import TestCase from linkml_runtime.utils.schemaview import SchemaView diff --git a/tests/test_issues/test_linkml_issue_576.py b/tests/test_issues/test_linkml_issue_576.py index 73b560f6..019a3038 100644 --- a/tests/test_issues/test_linkml_issue_576.py +++ b/tests/test_issues/test_linkml_issue_576.py @@ -2,9 +2,8 @@ from unittest import TestCase import rdflib -from rdflib import RDF -from linkml_runtime.dumpers import rdflib_dumper, yaml_dumper +from linkml_runtime.dumpers import rdflib_dumper from linkml_runtime.loaders import yaml_loader, rdflib_loader from linkml_runtime.utils.schemaview import SchemaView diff --git a/tests/test_issues/test_linkml_issue_817.py b/tests/test_issues/test_linkml_issue_817.py index 738b6c0e..9cf0d1e1 100644 --- a/tests/test_issues/test_linkml_issue_817.py +++ b/tests/test_issues/test_linkml_issue_817.py @@ -2,7 +2,6 @@ from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.loaders import yaml_loader -from linkml_runtime.utils.schemaview import SchemaView from tests.test_issues.environment import env from tests.test_issues.models.model_817 import Container, Person, VitalStatusEnum, PersonNoId diff --git a/tests/test_linkml_model/test_linkml_files.py b/tests/test_linkml_model/test_linkml_files.py index 5899950d..854c55e4 100644 --- a/tests/test_linkml_model/test_linkml_files.py +++ b/tests/test_linkml_model/test_linkml_files.py @@ -3,12 +3,9 @@ from pathlib import Path from itertools import product from urllib.parse import urlparse +from importlib.util import find_spec -try: - import requests_cache - HAVE_REQUESTS_CACHE = True -except ImportError: - HAVE_REQUESTS_CACHE = False +HAVE_REQUESTS_CACHE = bool(find_spec("requests_cache")) from linkml_runtime.linkml_model.linkml_files import ( Source, diff --git a/tests/test_loaders_dumpers/loaderdumpertestcase.py b/tests/test_loaders_dumpers/loaderdumpertestcase.py index 192edf9a..e545a8cd 100644 --- a/tests/test_loaders_dumpers/loaderdumpertestcase.py +++ b/tests/test_loaders_dumpers/loaderdumpertestcase.py @@ -1,5 +1,5 @@ import os -from typing import Callable, Type, Optional, List, Union +from typing import Callable, Optional, Union from urllib.parse import urlparse from hbreader import FileInfo, hbread @@ -45,7 +45,7 @@ def dumps_test(self, filename: str, dumper: Callable[[], str], comparator: Calla return self.env.eval_single_file(expected_file, actual, comparator=comparator) - def loader_test(self, filename: str, model: Union[Type[YAMLRoot], Type[BaseModel]], loader: Loader) -> None: + def loader_test(self, filename: str, model: Union[type[YAMLRoot], type[BaseModel]], loader: Loader) -> None: """ Test the various permutations of the supplied loader using the input file 'filename' -- both load and loads @@ -88,7 +88,7 @@ def loader_test(self, filename: str, model: Union[Type[YAMLRoot], Type[BaseModel self.env.eval_single_file(expected_yaml, yaml_dumper.dumps(python_obj)) @staticmethod - def check_context_servers(possible_server: List[str]) -> Optional[str]: + def check_context_servers(possible_server: list[str]) -> Optional[str]: """ Work down possible servers to see whether any of them are actually available :param possible_server: Ordered list of servers to check diff --git a/tests/test_loaders_dumpers/models/books_normalized.py b/tests/test_loaders_dumpers/models/books_normalized.py index b06d6547..35edd068 100644 --- a/tests/test_loaders_dumpers/models/books_normalized.py +++ b/tests/test_loaders_dumpers/models/books_normalized.py @@ -7,22 +7,18 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Float, Integer, String metamodel_version = "1.7.0" @@ -56,7 +52,7 @@ class CountryName(extended_str): @dataclass class CreativeWork(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.CreativeWork class_class_curie: ClassVar[str] = "example:CreativeWork" @@ -65,12 +61,12 @@ class CreativeWork(YAMLRoot): id: Union[str, CreativeWorkId] = None name: Optional[str] = None - genres: Optional[Union[Union[str, "GenreEnum"], List[Union[str, "GenreEnum"]]]] = empty_list() + genres: Optional[Union[Union[str, "GenreEnum"], list[Union[str, "GenreEnum"]]]] = empty_list() creator: Optional[Union[dict, "Author"]] = None summary: Optional[str] = None - reviews: Optional[Union[Union[dict, "Review"], List[Union[dict, "Review"]]]] = empty_list() + reviews: Optional[Union[Union[dict, "Review"], list[Union[dict, "Review"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, CreativeWorkId): @@ -102,7 +98,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Book(CreativeWork): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.Book class_class_curie: ClassVar[str] = "example:Book" @@ -113,7 +109,7 @@ class Book(CreativeWork): price: Optional[float] = None inStock: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, BookId): @@ -130,7 +126,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class BookSeries(CreativeWork): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.BookSeries class_class_curie: ClassVar[str] = "example:BookSeries" @@ -138,11 +134,11 @@ class BookSeries(CreativeWork): class_model_uri: ClassVar[URIRef] = EXAMPLE.BookSeries id: Union[str, BookSeriesId] = None - books: Optional[Union[Dict[Union[str, BookId], Union[dict, Book]], List[Union[dict, Book]]]] = empty_dict() - genres: Optional[Union[Union[str, "GenreEnum"], List[Union[str, "GenreEnum"]]]] = empty_list() + books: Optional[Union[dict[Union[str, BookId], Union[dict, Book]], list[Union[dict, Book]]]] = empty_dict() + genres: Optional[Union[Union[str, "GenreEnum"], list[Union[str, "GenreEnum"]]]] = empty_list() price: Optional[float] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, BookSeriesId): @@ -162,7 +158,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Author(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.Author class_class_curie: ClassVar[str] = "example:Author" @@ -170,10 +166,10 @@ class Author(YAMLRoot): class_model_uri: ClassVar[URIRef] = EXAMPLE.Author name: Optional[str] = None - genres: Optional[Union[Union[str, "GenreEnum"], List[Union[str, "GenreEnum"]]]] = empty_list() + genres: Optional[Union[Union[str, "GenreEnum"], list[Union[str, "GenreEnum"]]]] = empty_list() from_country: Optional[Union[str, CountryName]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.name is not None and not isinstance(self.name, str): self.name = str(self.name) @@ -189,16 +185,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Shop(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.Shop class_class_curie: ClassVar[str] = "example:Shop" class_name: ClassVar[str] = "shop" class_model_uri: ClassVar[URIRef] = EXAMPLE.Shop - all_book_series: Optional[Union[Dict[Union[str, BookSeriesId], Union[dict, BookSeries]], List[Union[dict, BookSeries]]]] = empty_dict() + all_book_series: Optional[Union[dict[Union[str, BookSeriesId], Union[dict, BookSeries]], list[Union[dict, BookSeries]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_list(slot_name="all_book_series", slot_type=BookSeries, key_name="id", keyed=True) super().__post_init__(**kwargs) @@ -206,7 +202,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Country(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.Country class_class_curie: ClassVar[str] = "example:Country" @@ -215,7 +211,7 @@ class Country(YAMLRoot): name: Union[str, CountryName] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.name): self.MissingRequiredField("name") if not isinstance(self.name, CountryName): @@ -226,7 +222,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Review(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EXAMPLE.Review class_class_curie: ClassVar[str] = "example:Review" @@ -237,7 +233,7 @@ class Review(YAMLRoot): rating: Optional[int] = None review_text: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.creator is not None and not isinstance(self.creator, Author): self.creator = Author(**as_dict(self.creator)) @@ -271,7 +267,7 @@ class slots: model_uri=EXAMPLE.id, domain=None, range=URIRef) slots.book_category = Slot(uri=EXAMPLE.book_category, name="book_category", curie=EXAMPLE.curie('book_category'), - model_uri=EXAMPLE.book_category, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=EXAMPLE.book_category, domain=None, range=Optional[Union[str, list[str]]]) slots.name = Slot(uri=EXAMPLE.name, name="name", curie=EXAMPLE.curie('name'), model_uri=EXAMPLE.name, domain=None, range=Optional[str]) @@ -286,22 +282,22 @@ class slots: model_uri=EXAMPLE.creator, domain=None, range=Optional[Union[dict, Author]]) slots.genres = Slot(uri=EXAMPLE.genres, name="genres", curie=EXAMPLE.curie('genres'), - model_uri=EXAMPLE.genres, domain=None, range=Optional[Union[Union[str, "GenreEnum"], List[Union[str, "GenreEnum"]]]]) + model_uri=EXAMPLE.genres, domain=None, range=Optional[Union[Union[str, "GenreEnum"], list[Union[str, "GenreEnum"]]]]) slots.from_country = Slot(uri=EXAMPLE.from_country, name="from_country", curie=EXAMPLE.curie('from_country'), model_uri=EXAMPLE.from_country, domain=None, range=Optional[Union[str, CountryName]]) slots.books = Slot(uri=EXAMPLE.books, name="books", curie=EXAMPLE.curie('books'), - model_uri=EXAMPLE.books, domain=None, range=Optional[Union[Dict[Union[str, BookId], Union[dict, Book]], List[Union[dict, Book]]]]) + model_uri=EXAMPLE.books, domain=None, range=Optional[Union[dict[Union[str, BookId], Union[dict, Book]], list[Union[dict, Book]]]]) slots.all_book_series = Slot(uri=EXAMPLE.all_book_series, name="all_book_series", curie=EXAMPLE.curie('all_book_series'), - model_uri=EXAMPLE.all_book_series, domain=None, range=Optional[Union[Dict[Union[str, BookSeriesId], Union[dict, BookSeries]], List[Union[dict, BookSeries]]]]) + model_uri=EXAMPLE.all_book_series, domain=None, range=Optional[Union[dict[Union[str, BookSeriesId], Union[dict, BookSeries]], list[Union[dict, BookSeries]]]]) slots.summary = Slot(uri=EXAMPLE.summary, name="summary", curie=EXAMPLE.curie('summary'), model_uri=EXAMPLE.summary, domain=None, range=Optional[str]) slots.reviews = Slot(uri=EXAMPLE.reviews, name="reviews", curie=EXAMPLE.curie('reviews'), - model_uri=EXAMPLE.reviews, domain=None, range=Optional[Union[Union[dict, Review], List[Union[dict, Review]]]]) + model_uri=EXAMPLE.reviews, domain=None, range=Optional[Union[Union[dict, Review], list[Union[dict, Review]]]]) slots.rating = Slot(uri=EXAMPLE.rating, name="rating", curie=EXAMPLE.curie('rating'), model_uri=EXAMPLE.rating, domain=None, range=Optional[int]) diff --git a/tests/test_loaders_dumpers/models/books_normalized_pydantic.py b/tests/test_loaders_dumpers/models/books_normalized_pydantic.py index d10222e6..ec421751 100644 --- a/tests/test_loaders_dumpers/models/books_normalized_pydantic.py +++ b/tests/test_loaders_dumpers/models/books_normalized_pydantic.py @@ -1,10 +1,6 @@ from __future__ import annotations -from datetime import datetime, date from enum import Enum -from typing import List, Dict, Optional, Any, Union -from typing_extensions import Literal from pydantic import BaseModel as BaseModel, Field -from linkml_runtime.linkml_model import Decimal metamodel_version = "None" version = "None" @@ -35,66 +31,66 @@ class GenreEnum(str, Enum): class CreativeWork(ConfiguredBaseModel): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - genres: Optional[List[GenreEnum]] = Field(default_factory=list) - creator: Optional[Author] = Field(None) - summary: Optional[str] = Field(None) - reviews: Optional[List[Review]] = Field(default_factory=list) + id: str | None = Field(None) + name: str | None = Field(None) + genres: list[GenreEnum] | None = Field(default_factory=list) + creator: Author | None = Field(None) + summary: str | None = Field(None) + reviews: list[Review] | None = Field(default_factory=list) class Book(CreativeWork): - price: Optional[float] = Field(None) - inStock: Optional[str] = Field(None) - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - genres: Optional[List[GenreEnum]] = Field(default_factory=list) - creator: Optional[Author] = Field(None) - summary: Optional[str] = Field(None) - reviews: Optional[List[Review]] = Field(default_factory=list) + price: float | None = Field(None) + inStock: str | None = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + genres: list[GenreEnum] | None = Field(default_factory=list) + creator: Author | None = Field(None) + summary: str | None = Field(None) + reviews: list[Review] | None = Field(default_factory=list) class BookSeries(CreativeWork): - books: Optional[List[Book]] = Field(default_factory=list) - genres: Optional[List[GenreEnum]] = Field(default_factory=list) - price: Optional[float] = Field(None) - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - creator: Optional[Author] = Field(None) - summary: Optional[str] = Field(None) - reviews: Optional[List[Review]] = Field(default_factory=list) + books: list[Book] | None = Field(default_factory=list) + genres: list[GenreEnum] | None = Field(default_factory=list) + price: float | None = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + creator: Author | None = Field(None) + summary: str | None = Field(None) + reviews: list[Review] | None = Field(default_factory=list) class Author(ConfiguredBaseModel): - name: Optional[str] = Field(None) - genres: Optional[List[GenreEnum]] = Field(default_factory=list) - from_country: Optional[str] = Field(None) + name: str | None = Field(None) + genres: list[GenreEnum] | None = Field(default_factory=list) + from_country: str | None = Field(None) class Shop(ConfiguredBaseModel): - all_book_series: Optional[List[BookSeries]] = Field(default_factory=list) + all_book_series: list[BookSeries] | None = Field(default_factory=list) class Country(ConfiguredBaseModel): - name: Optional[str] = Field(None) + name: str | None = Field(None) class Review(ConfiguredBaseModel): - creator: Optional[Author] = Field(None) - rating: Optional[int] = Field(None) - review_text: Optional[str] = Field(None) + creator: Author | None = Field(None) + rating: int | None = Field(None) + review_text: str | None = Field(None) diff --git a/tests/test_loaders_dumpers/models/enum_model.py b/tests/test_loaders_dumpers/models/enum_model.py index 141e6874..4c64c484 100644 --- a/tests/test_loaders_dumpers/models/enum_model.py +++ b/tests/test_loaders_dumpers/models/enum_model.py @@ -7,20 +7,15 @@ # license: import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -41,7 +36,7 @@ @dataclass class Organism(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = URIRef("https://example.org/enum_test/Organism") class_class_curie: ClassVar[str] = None @@ -50,7 +45,7 @@ class Organism(YAMLRoot): state: Optional[Union[str, "StateEnum"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.state is not None and not isinstance(self.state, StateEnum): self.state = StateEnum(self.state) diff --git a/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py b/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py index 1a2505d2..96a6570c 100644 --- a/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py +++ b/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py @@ -1,10 +1,8 @@ from __future__ import annotations -from datetime import datetime, date +from datetime import date from enum import Enum -from typing import List, Dict, Optional, Any, Union -from typing_extensions import Literal +from typing import Any from pydantic import BaseModel as BaseModel, Field -from linkml_runtime.linkml_model import Decimal metamodel_version = "None" version = "None" @@ -62,13 +60,13 @@ class LifeStatusEnum(str, Enum): class HasAliases(ConfiguredBaseModel): - aliases: Optional[List[str]] = Field(default_factory=list) + aliases: list[str] | None = Field(default_factory=list) class Friend(ConfiguredBaseModel): - name: Optional[str] = Field(None) + name: str | None = Field(None) @@ -76,18 +74,18 @@ class Person(HasAliases): """ A person, living or dead """ - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - has_employment_history: Optional[List[EmploymentEvent]] = Field(None) - has_familial_relationships: Optional[List[FamilialRelationship]] = Field(None) - has_medical_history: Optional[List[MedicalEvent]] = Field(None) - age_in_years: Optional[int] = Field(None, description="""number of years since birth""", ge=0, le=999) - addresses: Optional[List[Address]] = Field(default_factory=list) - has_birth_event: Optional[BirthEvent] = Field(None) - species_name: Optional[str] = Field(None) - stomach_count: Optional[int] = Field(None) - is_living: Optional[LifeStatusEnum] = Field(None) - aliases: Optional[List[str]] = Field(default_factory=list) + id: str | None = Field(None) + name: str | None = Field(None) + has_employment_history: list[EmploymentEvent] | None = Field(None) + has_familial_relationships: list[FamilialRelationship] | None = Field(None) + has_medical_history: list[MedicalEvent] | None = Field(None) + age_in_years: int | None = Field(None, description="""number of years since birth""", ge=0, le=999) + addresses: list[Address] | None = Field(default_factory=list) + has_birth_event: BirthEvent | None = Field(None) + species_name: str | None = Field(None) + stomach_count: int | None = Field(None) + is_living: LifeStatusEnum | None = Field(None) + aliases: list[str] | None = Field(default_factory=list) @@ -104,73 +102,73 @@ class Organization(HasAliases): * a * list """ - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - aliases: Optional[List[str]] = Field(default_factory=list) + id: str | None = Field(None) + name: str | None = Field(None) + aliases: list[str] | None = Field(default_factory=list) class Place(HasAliases): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - aliases: Optional[List[str]] = Field(default_factory=list) + id: str | None = Field(None) + name: str | None = Field(None) + aliases: list[str] | None = Field(default_factory=list) class Address(ConfiguredBaseModel): - street: Optional[str] = Field(None) - city: Optional[str] = Field(None) + street: str | None = Field(None) + city: str | None = Field(None) class Concept(ConfiguredBaseModel): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - in_code_system: Optional[str] = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + in_code_system: str | None = Field(None) class DiagnosisConcept(Concept): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - in_code_system: Optional[str] = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + in_code_system: str | None = Field(None) class ProcedureConcept(Concept): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - in_code_system: Optional[str] = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + in_code_system: str | None = Field(None) class Event(ConfiguredBaseModel): - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - is_current: Optional[bool] = Field(None) - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + is_current: bool | None = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") class Relationship(ConfiguredBaseModel): - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - related_to: Optional[str] = Field(None) - type: Optional[str] = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + related_to: str | None = Field(None) + type: str | None = Field(None) class FamilialRelationship(Relationship): - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) related_to: str = Field(...) type: FamilialRelationshipType = Field(...) @@ -178,103 +176,103 @@ class FamilialRelationship(Relationship): class BirthEvent(Event): - in_location: Optional[str] = Field(None) - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - is_current: Optional[bool] = Field(None) - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + in_location: str | None = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + is_current: bool | None = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") class EmploymentEvent(Event): - employed_at: Optional[str] = Field(None) - type: Optional[EmploymentEventType] = Field(None) - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - is_current: Optional[bool] = Field(None) - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + employed_at: str | None = Field(None) + type: EmploymentEventType | None = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + is_current: bool | None = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") class MedicalEvent(Event): - in_location: Optional[str] = Field(None) - diagnosis: Optional[DiagnosisConcept] = Field(None) - procedure: Optional[ProcedureConcept] = Field(None) - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - is_current: Optional[bool] = Field(None) - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + in_location: str | None = Field(None) + diagnosis: DiagnosisConcept | None = Field(None) + procedure: ProcedureConcept | None = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + is_current: bool | None = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") class WithLocation(ConfiguredBaseModel): - in_location: Optional[str] = Field(None) + in_location: str | None = Field(None) class MarriageEvent(WithLocation, Event): - married_to: Optional[str] = Field(None) - in_location: Optional[str] = Field(None) - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - is_current: Optional[bool] = Field(None) - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + married_to: str | None = Field(None) + in_location: str | None = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + is_current: bool | None = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") class Company(Organization): - ceo: Optional[str] = Field(None) - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) - aliases: Optional[List[str]] = Field(default_factory=list) + ceo: str | None = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) + aliases: list[str] | None = Field(default_factory=list) class CodeSystem(ConfiguredBaseModel): - id: Optional[str] = Field(None) - name: Optional[str] = Field(None) + id: str | None = Field(None) + name: str | None = Field(None) class Dataset(ConfiguredBaseModel): - metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") - persons: Optional[List[Person]] = Field(default_factory=list) - companies: Optional[List[Company]] = Field(default_factory=list) - activities: Optional[List[Activity]] = Field(default_factory=list) - code_systems: Optional[Dict[str, CodeSystem]] = Field(None) + metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + persons: list[Person] | None = Field(default_factory=list) + companies: list[Company] | None = Field(default_factory=list) + activities: list[Activity] | None = Field(default_factory=list) + code_systems: dict[str, CodeSystem] | None = Field(None) class FakeClass(ConfiguredBaseModel): - test_attribute: Optional[str] = Field(None) + test_attribute: str | None = Field(None) class ClassWithSpaces(ConfiguredBaseModel): - slot_with_space_1: Optional[str] = Field(None) + slot_with_space_1: str | None = Field(None) class SubclassTest(ClassWithSpaces): - slot_with_space_2: Optional[ClassWithSpaces] = Field(None) - slot_with_space_1: Optional[str] = Field(None) + slot_with_space_2: ClassWithSpaces | None = Field(None) + slot_with_space_1: str | None = Field(None) class SubSubClass2(SubclassTest): - slot_with_space_2: Optional[ClassWithSpaces] = Field(None) - slot_with_space_1: Optional[str] = Field(None) + slot_with_space_2: ClassWithSpaces | None = Field(None) + slot_with_space_1: str | None = Field(None) @@ -282,8 +280,8 @@ class TubSubClass1(SubclassTest): """ Same depth as Sub sub class 1 """ - slot_with_space_2: Optional[ClassWithSpaces] = Field(None) - slot_with_space_1: Optional[str] = Field(None) + slot_with_space_2: ClassWithSpaces | None = Field(None) + slot_with_space_1: str | None = Field(None) @@ -291,13 +289,13 @@ class Activity(ConfiguredBaseModel): """ a provence-generating activity """ - id: Optional[str] = Field(None) - started_at_time: Optional[date] = Field(None) - ended_at_time: Optional[date] = Field(None) - was_informed_by: Optional[str] = Field(None) - was_associated_with: Optional[str] = Field(None) - used: Optional[str] = Field(None) - description: Optional[str] = Field(None) + id: str | None = Field(None) + started_at_time: date | None = Field(None) + ended_at_time: date | None = Field(None) + was_informed_by: str | None = Field(None) + was_associated_with: str | None = Field(None) + used: str | None = Field(None) + description: str | None = Field(None) @@ -305,9 +303,9 @@ class Agent(ConfiguredBaseModel): """ a provence-generating agent """ - id: Optional[str] = Field(None) - acted_on_behalf_of: Optional[str] = Field(None) - was_informed_by: Optional[str] = Field(None) + id: str | None = Field(None) + acted_on_behalf_of: str | None = Field(None) + was_informed_by: str | None = Field(None) diff --git a/tests/test_loaders_dumpers/models/node_object.py b/tests/test_loaders_dumpers/models/node_object.py index 4ebaa2b5..4cbf888d 100644 --- a/tests/test_loaders_dumpers/models/node_object.py +++ b/tests/test_loaders_dumpers/models/node_object.py @@ -7,22 +7,16 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import String metamodel_version = "1.7.0" @@ -54,7 +48,7 @@ class Triple(YAMLRoot): """ Represents an RDF triple """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = RDF.Statement class_class_curie: ClassVar[str] = "rdf:Statement" @@ -65,7 +59,7 @@ class Triple(YAMLRoot): predicate: Optional[Union[str, NodeId]] = None object: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.subject is not None and not isinstance(self.subject, NodeId): self.subject = NodeId(self.subject) @@ -80,7 +74,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Node(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Node class_class_curie: ClassVar[str] = "ex:Node" @@ -89,7 +83,7 @@ class Node(YAMLRoot): id: Union[str, NodeId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, NodeId): @@ -100,7 +94,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class NodeObject(Node): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = RDF.Resource class_class_curie: ClassVar[str] = "rdf:Resource" @@ -108,9 +102,9 @@ class NodeObject(Node): class_model_uri: ClassVar[URIRef] = EX.NodeObject id: Union[str, NodeObjectId] = None - statements: Optional[Union[Union[dict, Triple], List[Union[dict, Triple]]]] = empty_list() + statements: Optional[Union[Union[dict, Triple], list[Union[dict, Triple]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, NodeObjectId): @@ -146,7 +140,7 @@ class slots: model_uri=EX.graph, domain=None, range=Optional[Union[str, NodeId]]) slots.statements = Slot(uri=SPARQLFUN.statements, name="statements", curie=SPARQLFUN.curie('statements'), - model_uri=EX.statements, domain=None, range=Optional[Union[Union[dict, Triple], List[Union[dict, Triple]]]]) + model_uri=EX.statements, domain=None, range=Optional[Union[Union[dict, Triple], list[Union[dict, Triple]]]]) slots.type = Slot(uri=EX.type, name="type", curie=EX.curie('type'), model_uri=EX.type, domain=None, range=Optional[Union[str, NodeId]]) diff --git a/tests/test_loaders_dumpers/models/personinfo.py b/tests/test_loaders_dumpers/models/personinfo.py index a061168e..643ccb8b 100644 --- a/tests/test_loaders_dumpers/models/personinfo.py +++ b/tests/test_loaders_dumpers/models/personinfo.py @@ -7,23 +7,21 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Boolean, Date, Decimal, Float, Integer, String, Uri, Uriorcurie -from linkml_runtime.utils.metamodelcore import Bool, Decimal, URI, URIorCURIE, XSDDate +from linkml_runtime.linkml_model.types import Decimal, Uri, Uriorcurie +from linkml_runtime.utils.metamodelcore import Bool, Decimal, XSDDate metamodel_version = "1.7.0" version = None @@ -116,7 +114,7 @@ class NamedThing(YAMLRoot): """ A generic grouping for any identifiable entity """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.NamedThing class_class_curie: ClassVar[str] = "personinfo:NamedThing" @@ -129,7 +127,7 @@ class NamedThing(YAMLRoot): image: Optional[str] = None depicted_by: Optional[Union[str, ImageURL]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, NamedThingId): @@ -155,7 +153,7 @@ class Person(NamedThing): """ A person (alive, dead, undead, or fictional). """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Person class_class_curie: ClassVar[str] = "schema:Person" @@ -168,13 +166,13 @@ class Person(NamedThing): age_in_years: Optional[int] = None gender: Optional[Union[str, "GenderType"]] = None current_address: Optional[Union[dict, "Address"]] = None - has_employment_history: Optional[Union[Union[dict, "EmploymentEvent"], List[Union[dict, "EmploymentEvent"]]]] = empty_list() - has_familial_relationships: Optional[Union[Union[dict, "FamilialRelationship"], List[Union[dict, "FamilialRelationship"]]]] = empty_list() - has_interpersonal_relationships: Optional[Union[Union[dict, "InterPersonalRelationship"], List[Union[dict, "InterPersonalRelationship"]]]] = empty_list() - has_medical_history: Optional[Union[Union[dict, "MedicalEvent"], List[Union[dict, "MedicalEvent"]]]] = empty_list() - aliases: Optional[Union[str, List[str]]] = empty_list() + has_employment_history: Optional[Union[Union[dict, "EmploymentEvent"], list[Union[dict, "EmploymentEvent"]]]] = empty_list() + has_familial_relationships: Optional[Union[Union[dict, "FamilialRelationship"], list[Union[dict, "FamilialRelationship"]]]] = empty_list() + has_interpersonal_relationships: Optional[Union[Union[dict, "InterPersonalRelationship"], list[Union[dict, "InterPersonalRelationship"]]]] = empty_list() + has_medical_history: Optional[Union[Union[dict, "MedicalEvent"], list[Union[dict, "MedicalEvent"]]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PersonId): @@ -223,16 +221,16 @@ class HasAliases(YAMLRoot): """ A mixin applied to any class that can have aliases/alternateNames """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.HasAliases class_class_curie: ClassVar[str] = "personinfo:HasAliases" class_name: ClassVar[str] = "HasAliases" class_model_uri: ClassVar[URIRef] = PERSONINFO.HasAliases - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.aliases, list): self.aliases = [self.aliases] if self.aliases is not None else [] self.aliases = [v if isinstance(v, str) else str(v) for v in self.aliases] @@ -245,7 +243,7 @@ class Organization(NamedThing): """ An organization such as a company or university """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.Organization class_class_curie: ClassVar[str] = "schema:Organization" @@ -256,12 +254,12 @@ class Organization(NamedThing): mission_statement: Optional[str] = None founding_date: Optional[str] = None founding_location: Optional[Union[str, PlaceId]] = None - categories: Optional[Union[Union[str, "OrganizationType"], List[Union[str, "OrganizationType"]]]] = empty_list() + categories: Optional[Union[Union[str, "OrganizationType"], list[Union[str, "OrganizationType"]]]] = empty_list() score: Optional[Decimal] = None min_salary: Optional[Union[Decimal, SalaryType]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, OrganizationId): @@ -295,7 +293,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Place(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Place class_class_curie: ClassVar[str] = "personinfo:Place" @@ -305,9 +303,9 @@ class Place(YAMLRoot): id: Union[str, PlaceId] = None name: Optional[str] = None depicted_by: Optional[Union[str, ImageURL]] = None - aliases: Optional[Union[str, List[str]]] = empty_list() + aliases: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PlaceId): @@ -328,7 +326,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Address(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SCHEMA.PostalAddress class_class_curie: ClassVar[str] = "schema:PostalAddress" @@ -339,7 +337,7 @@ class Address(YAMLRoot): city: Optional[str] = None postal_code: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.street is not None and not isinstance(self.street, str): self.street = str(self.street) @@ -354,7 +352,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Event(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Event class_class_curie: ClassVar[str] = "personinfo:Event" @@ -366,7 +364,7 @@ class Event(YAMLRoot): duration: Optional[float] = None is_current: Optional[Union[bool, Bool]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.started_at_time is not None and not isinstance(self.started_at_time, XSDDate): self.started_at_time = XSDDate(self.started_at_time) @@ -384,7 +382,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Concept(NamedThing): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Concept class_class_curie: ClassVar[str] = "personinfo:Concept" @@ -393,9 +391,9 @@ class Concept(NamedThing): id: Union[str, ConceptId] = None code_system: Optional[Union[str, CodeSystemId]] = None - mappings: Optional[Union[Union[str, CrossReference], List[Union[str, CrossReference]]]] = empty_list() + mappings: Optional[Union[Union[str, CrossReference], list[Union[str, CrossReference]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ConceptId): @@ -413,7 +411,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class DiagnosisConcept(Concept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.DiagnosisConcept class_class_curie: ClassVar[str] = "personinfo:DiagnosisConcept" @@ -422,7 +420,7 @@ class DiagnosisConcept(Concept): id: Union[str, DiagnosisConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, DiagnosisConceptId): @@ -433,7 +431,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ProcedureConcept(Concept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.ProcedureConcept class_class_curie: ClassVar[str] = "personinfo:ProcedureConcept" @@ -443,7 +441,7 @@ class ProcedureConcept(Concept): id: Union[str, ProcedureConceptId] = None subtype: Optional[Union[str, ConceptId]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ProcedureConceptId): @@ -457,7 +455,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class OperationProcedureConcept(ProcedureConcept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.OperationProcedureConcept class_class_curie: ClassVar[str] = "personinfo:OperationProcedureConcept" @@ -466,7 +464,7 @@ class OperationProcedureConcept(ProcedureConcept): id: Union[str, OperationProcedureConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, OperationProcedureConceptId): @@ -477,7 +475,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ImagingProcedureConcept(ProcedureConcept): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.ImagingProcedureConcept class_class_curie: ClassVar[str] = "personinfo:ImagingProcedureConcept" @@ -486,7 +484,7 @@ class ImagingProcedureConcept(ProcedureConcept): id: Union[str, ImagingProcedureConceptId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, ImagingProcedureConceptId): @@ -497,7 +495,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class CodeSystem(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.CodeSystem class_class_curie: ClassVar[str] = "personinfo:CodeSystem" @@ -507,7 +505,7 @@ class CodeSystem(YAMLRoot): id: Union[str, CodeSystemId] = None name: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, CodeSystemId): @@ -521,7 +519,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Relationship(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Relationship class_class_curie: ClassVar[str] = "personinfo:Relationship" @@ -533,7 +531,7 @@ class Relationship(YAMLRoot): related_to: Optional[Union[str, NamedThingId]] = None type: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.started_at_time is not None and not isinstance(self.started_at_time, XSDDate): self.started_at_time = XSDDate(self.started_at_time) @@ -551,7 +549,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class FamilialRelationship(Relationship): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.FamilialRelationship class_class_curie: ClassVar[str] = "personinfo:FamilialRelationship" @@ -561,7 +559,7 @@ class FamilialRelationship(Relationship): type: Union[str, "FamilialRelationshipType"] = None related_to: Union[str, PersonId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.type): self.MissingRequiredField("type") if not isinstance(self.type, FamilialRelationshipType): @@ -577,7 +575,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class InterPersonalRelationship(Relationship): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.InterPersonalRelationship class_class_curie: ClassVar[str] = "personinfo:InterPersonalRelationship" @@ -587,7 +585,7 @@ class InterPersonalRelationship(Relationship): type: str = None related_to: Union[str, PersonId] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.type): self.MissingRequiredField("type") if not isinstance(self.type, str): @@ -603,7 +601,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class EmploymentEvent(Event): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.EmploymentEvent class_class_curie: ClassVar[str] = "personinfo:EmploymentEvent" @@ -613,7 +611,7 @@ class EmploymentEvent(Event): employed_at: Optional[Union[str, OrganizationId]] = None salary: Optional[Union[Decimal, SalaryType]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.employed_at is not None and not isinstance(self.employed_at, OrganizationId): self.employed_at = OrganizationId(self.employed_at) @@ -625,7 +623,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class MedicalEvent(Event): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.MedicalEvent class_class_curie: ClassVar[str] = "personinfo:MedicalEvent" @@ -636,7 +634,7 @@ class MedicalEvent(Event): diagnosis: Optional[Union[dict, DiagnosisConcept]] = None procedure: Optional[Union[dict, ProcedureConcept]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.in_location is not None and not isinstance(self.in_location, PlaceId): self.in_location = PlaceId(self.in_location) @@ -651,7 +649,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class WithLocation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.WithLocation class_class_curie: ClassVar[str] = "personinfo:WithLocation" @@ -660,7 +658,7 @@ class WithLocation(YAMLRoot): in_location: Optional[Union[str, PlaceId]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.in_location is not None and not isinstance(self.in_location, PlaceId): self.in_location = PlaceId(self.in_location) @@ -669,17 +667,17 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Container class_class_curie: ClassVar[str] = "personinfo:Container" class_name: ClassVar[str] = "Container" class_model_uri: ClassVar[URIRef] = PERSONINFO.Container - persons: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() - organizations: Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]] = empty_dict() + persons: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() + organizations: Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_list(slot_name="persons", slot_type=Person, key_name="id", keyed=True) self._normalize_inlined_as_dict(slot_name="organizations", slot_type=Organization, key_name="id", keyed=True) @@ -800,16 +798,16 @@ class slots: model_uri=PERSONINFO.is_current, domain=None, range=Optional[Union[bool, Bool]]) slots.has_employment_history = Slot(uri=PERSONINFO.has_employment_history, name="has_employment_history", curie=PERSONINFO.curie('has_employment_history'), - model_uri=PERSONINFO.has_employment_history, domain=None, range=Optional[Union[Union[dict, EmploymentEvent], List[Union[dict, EmploymentEvent]]]]) + model_uri=PERSONINFO.has_employment_history, domain=None, range=Optional[Union[Union[dict, EmploymentEvent], list[Union[dict, EmploymentEvent]]]]) slots.has_medical_history = Slot(uri=PERSONINFO.has_medical_history, name="has_medical_history", curie=PERSONINFO.curie('has_medical_history'), - model_uri=PERSONINFO.has_medical_history, domain=None, range=Optional[Union[Union[dict, MedicalEvent], List[Union[dict, MedicalEvent]]]]) + model_uri=PERSONINFO.has_medical_history, domain=None, range=Optional[Union[Union[dict, MedicalEvent], list[Union[dict, MedicalEvent]]]]) slots.has_familial_relationships = Slot(uri=PERSONINFO.has_familial_relationships, name="has_familial_relationships", curie=PERSONINFO.curie('has_familial_relationships'), - model_uri=PERSONINFO.has_familial_relationships, domain=None, range=Optional[Union[Union[dict, FamilialRelationship], List[Union[dict, FamilialRelationship]]]]) + model_uri=PERSONINFO.has_familial_relationships, domain=None, range=Optional[Union[Union[dict, FamilialRelationship], list[Union[dict, FamilialRelationship]]]]) slots.has_interpersonal_relationships = Slot(uri=PERSONINFO.has_interpersonal_relationships, name="has_interpersonal_relationships", curie=PERSONINFO.curie('has_interpersonal_relationships'), - model_uri=PERSONINFO.has_interpersonal_relationships, domain=None, range=Optional[Union[Union[dict, InterPersonalRelationship], List[Union[dict, InterPersonalRelationship]]]]) + model_uri=PERSONINFO.has_interpersonal_relationships, domain=None, range=Optional[Union[Union[dict, InterPersonalRelationship], list[Union[dict, InterPersonalRelationship]]]]) slots.in_location = Slot(uri=PERSONINFO.in_location, name="in location", curie=PERSONINFO.curie('in_location'), model_uri=PERSONINFO.in_location, domain=None, range=Optional[Union[str, PlaceId]]) @@ -869,7 +867,7 @@ class slots: model_uri=PERSONINFO.ended_at_time, domain=None, range=Optional[Union[str, XSDDate]]) slots.categories = Slot(uri=PERSONINFO.categories, name="categories", curie=PERSONINFO.curie('categories'), - model_uri=PERSONINFO.categories, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PERSONINFO.categories, domain=None, range=Optional[Union[str, list[str]]]) slots.salary = Slot(uri=PERSONINFO.salary, name="salary", curie=PERSONINFO.curie('salary'), model_uri=PERSONINFO.salary, domain=None, range=Optional[Union[Decimal, SalaryType]]) @@ -878,19 +876,19 @@ class slots: model_uri=PERSONINFO.min_salary, domain=None, range=Optional[Union[Decimal, SalaryType]]) slots.hasAliases__aliases = Slot(uri=PERSONINFO.aliases, name="hasAliases__aliases", curie=PERSONINFO.curie('aliases'), - model_uri=PERSONINFO.hasAliases__aliases, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PERSONINFO.hasAliases__aliases, domain=None, range=Optional[Union[str, list[str]]]) slots.concept__code_system = Slot(uri=PERSONINFO.code_system, name="concept__code_system", curie=PERSONINFO.curie('code_system'), model_uri=PERSONINFO.concept__code_system, domain=None, range=Optional[Union[str, CodeSystemId]]) slots.concept__mappings = Slot(uri=SKOS.exactMatch, name="concept__mappings", curie=SKOS.curie('exactMatch'), - model_uri=PERSONINFO.concept__mappings, domain=None, range=Optional[Union[Union[str, CrossReference], List[Union[str, CrossReference]]]]) + model_uri=PERSONINFO.concept__mappings, domain=None, range=Optional[Union[Union[str, CrossReference], list[Union[str, CrossReference]]]]) slots.container__persons = Slot(uri=PERSONINFO.persons, name="container__persons", curie=PERSONINFO.curie('persons'), - model_uri=PERSONINFO.container__persons, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.container__persons, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) slots.container__organizations = Slot(uri=PERSONINFO.organizations, name="container__organizations", curie=PERSONINFO.curie('organizations'), - model_uri=PERSONINFO.container__organizations, domain=None, range=Optional[Union[Dict[Union[str, OrganizationId], Union[dict, Organization]], List[Union[dict, Organization]]]]) + model_uri=PERSONINFO.container__organizations, domain=None, range=Optional[Union[dict[Union[str, OrganizationId], Union[dict, Organization]], list[Union[dict, Organization]]]]) slots.related_to = Slot(uri=PERSONINFO.related_to, name="related to", curie=PERSONINFO.curie('related_to'), model_uri=PERSONINFO.related_to, domain=None, range=Union[str, PersonId]) @@ -900,7 +898,7 @@ class slots: pattern=re.compile(r'^\S+@[\S+\.]+\S+')) slots.Organization_categories = Slot(uri=PERSONINFO.categories, name="Organization_categories", curie=PERSONINFO.curie('categories'), - model_uri=PERSONINFO.Organization_categories, domain=Organization, range=Optional[Union[Union[str, "OrganizationType"], List[Union[str, "OrganizationType"]]]]) + model_uri=PERSONINFO.Organization_categories, domain=Organization, range=Optional[Union[Union[str, "OrganizationType"], list[Union[str, "OrganizationType"]]]]) slots.FamilialRelationship_type = Slot(uri=PERSONINFO.type, name="FamilialRelationship_type", curie=PERSONINFO.curie('type'), model_uri=PERSONINFO.FamilialRelationship_type, domain=FamilialRelationship, range=Union[str, "FamilialRelationshipType"]) diff --git a/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py b/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py index fed09fa2..68aaf70c 100644 --- a/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py +++ b/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py @@ -7,22 +7,15 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import String metamodel_version = "1.7.0" version = None @@ -47,7 +40,7 @@ class PersonId(extended_str): @dataclass class Person(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SDO.Person class_class_curie: ClassVar[str] = "sdo:Person" @@ -59,7 +52,7 @@ class Person(YAMLRoot): age: Optional[str] = None phone: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, PersonId): @@ -79,16 +72,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PERSONINFO.Container class_class_curie: ClassVar[str] = "personinfo:Container" class_name: ClassVar[str] = "Container" class_model_uri: ClassVar[URIRef] = PERSONINFO.Container - persons: Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]] = empty_dict() + persons: Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_list(slot_name="persons", slot_type=Person, key_name="id", keyed=True) super().__post_init__(**kwargs) @@ -114,4 +107,4 @@ class slots: model_uri=PERSONINFO.phone, domain=None, range=Optional[str]) slots.container__persons = Slot(uri=PERSONINFO.persons, name="container__persons", curie=PERSONINFO.curie('persons'), - model_uri=PERSONINFO.container__persons, domain=None, range=Optional[Union[Dict[Union[str, PersonId], Union[dict, Person]], List[Union[dict, Person]]]]) + model_uri=PERSONINFO.container__persons, domain=None, range=Optional[Union[dict[Union[str, PersonId], Union[dict, Person]], list[Union[dict, Person]]]]) diff --git a/tests/test_loaders_dumpers/models/phenopackets.py b/tests/test_loaders_dumpers/models/phenopackets.py index 255a4578..0b2446ca 100644 --- a/tests/test_loaders_dumpers/models/phenopackets.py +++ b/tests/test_loaders_dumpers/models/phenopackets.py @@ -7,22 +7,18 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Boolean, Double, Integer, String from linkml_runtime.utils.metamodelcore import Bool metamodel_version = "1.7.0" @@ -73,7 +69,7 @@ class Cohort(YAMLRoot): """ A group of individuals related in some phenotypic or genotypic aspect. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PHENOPACKETS.Cohort class_class_curie: ClassVar[str] = "phenopackets:Cohort" @@ -82,11 +78,11 @@ class Cohort(YAMLRoot): metaData: Union[dict, "MetaData"] = None description: Optional[str] = None - files: Optional[Union[Union[dict, "File"], List[Union[dict, "File"]]]] = empty_list() + files: Optional[Union[Union[dict, "File"], list[Union[dict, "File"]]]] = empty_list() id: Optional[str] = None - members: Optional[Union[Union[dict, "Phenopacket"], List[Union[dict, "Phenopacket"]]]] = empty_list() + members: Optional[Union[Union[dict, "Phenopacket"], list[Union[dict, "Phenopacket"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.metaData): self.MissingRequiredField("metaData") if not isinstance(self.metaData, MetaData): @@ -114,7 +110,7 @@ class Family(YAMLRoot): InterpretationRequestRD https://github.com/genomicsengland/GelReportModels/blob/master/schemas/IDLs/org.gel.models.report.avro/5.0.0/InterpretationRequestRD.avdl """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PHENOPACKETS.Family class_class_curie: ClassVar[str] = "phenopackets:Family" @@ -123,13 +119,13 @@ class Family(YAMLRoot): metaData: Union[dict, "MetaData"] = None consanguinousParents: Optional[Union[bool, Bool]] = None - files: Optional[Union[Union[dict, "File"], List[Union[dict, "File"]]]] = empty_list() + files: Optional[Union[Union[dict, "File"], list[Union[dict, "File"]]]] = empty_list() id: Optional[str] = None pedigree: Optional[Union[dict, "Pedigree"]] = None proband: Optional[Union[dict, "Phenopacket"]] = None - relatives: Optional[Union[Union[dict, "Phenopacket"], List[Union[dict, "Phenopacket"]]]] = empty_list() + relatives: Optional[Union[Union[dict, "Phenopacket"], list[Union[dict, "Phenopacket"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.metaData): self.MissingRequiredField("metaData") if not isinstance(self.metaData, MetaData): @@ -164,7 +160,7 @@ class Phenopacket(YAMLRoot): expected that the resources sharing the phenopackets will define and enforce their own semantics and level of requirements for included fields. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PHENOPACKETS.Phenopacket class_class_curie: ClassVar[str] = "phenopackets:Phenopacket" @@ -172,17 +168,17 @@ class Phenopacket(YAMLRoot): class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Phenopacket metaData: Union[dict, "MetaData"] = None - biosamples: Optional[Union[Union[dict, "Biosample"], List[Union[dict, "Biosample"]]]] = empty_list() - diseases: Optional[Union[Union[dict, "Disease"], List[Union[dict, "Disease"]]]] = empty_list() - files: Optional[Union[Union[dict, "File"], List[Union[dict, "File"]]]] = empty_list() + biosamples: Optional[Union[Union[dict, "Biosample"], list[Union[dict, "Biosample"]]]] = empty_list() + diseases: Optional[Union[Union[dict, "Disease"], list[Union[dict, "Disease"]]]] = empty_list() + files: Optional[Union[Union[dict, "File"], list[Union[dict, "File"]]]] = empty_list() id: Optional[str] = None - interpretations: Optional[Union[Union[dict, "Interpretation"], List[Union[dict, "Interpretation"]]]] = empty_list() - measurements: Optional[Union[Union[dict, "Measurement"], List[Union[dict, "Measurement"]]]] = empty_list() - medicalActions: Optional[Union[Union[dict, "MedicalAction"], List[Union[dict, "MedicalAction"]]]] = empty_list() - phenotypicFeatures: Optional[Union[Union[dict, "PhenotypicFeature"], List[Union[dict, "PhenotypicFeature"]]]] = empty_list() + interpretations: Optional[Union[Union[dict, "Interpretation"], list[Union[dict, "Interpretation"]]]] = empty_list() + measurements: Optional[Union[Union[dict, "Measurement"], list[Union[dict, "Measurement"]]]] = empty_list() + medicalActions: Optional[Union[Union[dict, "MedicalAction"], list[Union[dict, "MedicalAction"]]]] = empty_list() + phenotypicFeatures: Optional[Union[Union[dict, "PhenotypicFeature"], list[Union[dict, "PhenotypicFeature"]]]] = empty_list() subject: Optional[Union[dict, "Individual"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.metaData): self.MissingRequiredField("metaData") if not isinstance(self.metaData, MetaData): @@ -231,7 +227,7 @@ class Age(YAMLRoot): See http://build.fhir.org/datatypes and http://build.fhir.org/condition-definitions.html#Condition.onset_x_ In FHIR this is represented as a UCUM measurement - http://unitsofmeasure.org/trac/ """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.Age class_class_curie: ClassVar[str] = "base:Age" @@ -240,7 +236,7 @@ class Age(YAMLRoot): iso8601duration: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.iso8601duration is not None and not isinstance(self.iso8601duration, str): self.iso8601duration = str(self.iso8601duration) @@ -249,7 +245,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class AgeRange(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.AgeRange class_class_curie: ClassVar[str] = "base:AgeRange" @@ -259,7 +255,7 @@ class AgeRange(YAMLRoot): end: Optional[Union[dict, Age]] = None start: Optional[Union[dict, Age]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.end is not None and not isinstance(self.end, Age): self.end = Age(**as_dict(self.end)) @@ -270,7 +266,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): class Dictionary(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.Dictionary class_class_curie: ClassVar[str] = "base:Dictionary" @@ -283,7 +279,7 @@ class Evidence(YAMLRoot): """ FHIR mapping: Condition.evidence (https://www.hl7.org/fhir/condition-definitions.html#Condition.evidence) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.Evidence class_class_curie: ClassVar[str] = "base:Evidence" @@ -293,7 +289,7 @@ class Evidence(YAMLRoot): evidenceCode: Optional[Union[dict, "OntologyClass"]] = None reference: Optional[Union[dict, "ExternalReference"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.evidenceCode is not None and not isinstance(self.evidenceCode, OntologyClass): self.evidenceCode = OntologyClass(**as_dict(self.evidenceCode)) @@ -308,7 +304,7 @@ class ExternalReference(YAMLRoot): """ FHIR mapping: Reference (https://www.hl7.org/fhir/references.html) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.ExternalReference class_class_curie: ClassVar[str] = "base:ExternalReference" @@ -319,7 +315,7 @@ class ExternalReference(YAMLRoot): id: Optional[str] = None reference: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.description is not None and not isinstance(self.description, str): self.description = str(self.description) @@ -334,7 +330,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class File(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.File class_class_curie: ClassVar[str] = "base:File" @@ -345,7 +341,7 @@ class File(YAMLRoot): individualToFileIdentifiers: Optional[Union[dict, Dictionary]] = None uri: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.fileAttributes is not None and not isinstance(self.fileAttributes, Dictionary): self.fileAttributes = Dictionary() @@ -360,7 +356,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class GestationalAge(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.GestationalAge class_class_curie: ClassVar[str] = "base:GestationalAge" @@ -370,7 +366,7 @@ class GestationalAge(YAMLRoot): days: Optional[int] = None weeks: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.days is not None and not isinstance(self.days, int): self.days = int(self.days) @@ -387,7 +383,7 @@ class OntologyClass(YAMLRoot): (http://www.hl7.org/fhir/datatypes.html#CodeableConcept) see also Coding (http://www.hl7.org/fhir/datatypes.html#Coding) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.OntologyClass class_class_curie: ClassVar[str] = "base:OntologyClass" @@ -397,7 +393,7 @@ class OntologyClass(YAMLRoot): id: Union[str, OntologyClassId] = None label: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.id): self.MissingRequiredField("id") if not isinstance(self.id, OntologyClassId): @@ -418,7 +414,7 @@ class Procedure(YAMLRoot): "body_site":{"UBERON:0003403": "skin of forearm"}} - a punch biopsy of the skin from the forearm FHIR mapping: Procedure (https://www.hl7.org/fhir/procedure.html) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.Procedure class_class_curie: ClassVar[str] = "base:Procedure" @@ -429,7 +425,7 @@ class Procedure(YAMLRoot): code: Optional[Union[dict, OntologyClass]] = None performed: Optional[Union[dict, "TimeElement"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.bodySite is not None and not isinstance(self.bodySite, OntologyClass): self.bodySite = OntologyClass(**as_dict(self.bodySite)) @@ -444,7 +440,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class TimeElement(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.TimeElement class_class_curie: ClassVar[str] = "base:TimeElement" @@ -458,7 +454,7 @@ class TimeElement(YAMLRoot): ontologyClass: Optional[Union[dict, OntologyClass]] = None timestamp: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.age is not None and not isinstance(self.age, Age): self.age = Age(**as_dict(self.age)) @@ -482,7 +478,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class TimeInterval(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BASE.TimeInterval class_class_curie: ClassVar[str] = "base:TimeInterval" @@ -492,7 +488,7 @@ class TimeInterval(YAMLRoot): end: Optional[str] = None start: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.end is not None and not isinstance(self.end, str): self.end = str(self.end) @@ -512,7 +508,7 @@ class Biosample(YAMLRoot): genomic array as well as RNA-seq experiments) may refer to the same Biosample. FHIR mapping: Specimen (http://www.hl7.org/fhir/specimen.html). """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = BIOSAMPLE.Biosample class_class_curie: ClassVar[str] = "biosample:Biosample" @@ -521,16 +517,16 @@ class Biosample(YAMLRoot): derivedFromId: Optional[str] = None description: Optional[str] = None - diagnosticMarkers: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() - files: Optional[Union[Union[dict, File], List[Union[dict, File]]]] = empty_list() + diagnosticMarkers: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() + files: Optional[Union[Union[dict, File], list[Union[dict, File]]]] = empty_list() histologicalDiagnosis: Optional[Union[dict, OntologyClass]] = None id: Optional[str] = None individualId: Optional[str] = None materialSample: Optional[Union[dict, OntologyClass]] = None - measurements: Optional[Union[Union[dict, "Measurement"], List[Union[dict, "Measurement"]]]] = empty_list() + measurements: Optional[Union[Union[dict, "Measurement"], list[Union[dict, "Measurement"]]]] = empty_list() pathologicalStage: Optional[Union[dict, OntologyClass]] = None - pathologicalTnmFinding: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() - phenotypicFeatures: Optional[Union[Union[dict, "PhenotypicFeature"], List[Union[dict, "PhenotypicFeature"]]]] = empty_list() + pathologicalTnmFinding: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() + phenotypicFeatures: Optional[Union[Union[dict, "PhenotypicFeature"], list[Union[dict, "PhenotypicFeature"]]]] = empty_list() procedure: Optional[Union[dict, Procedure]] = None sampleProcessing: Optional[Union[dict, OntologyClass]] = None sampleStorage: Optional[Union[dict, OntologyClass]] = None @@ -541,7 +537,7 @@ class Biosample(YAMLRoot): tumorGrade: Optional[Union[dict, OntologyClass]] = None tumorProgression: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.derivedFromId is not None and not isinstance(self.derivedFromId, str): self.derivedFromId = str(self.derivedFromId) @@ -614,15 +610,15 @@ class Disease(YAMLRoot): """ Message to indicate a disease (diagnosis) and its recorded onset. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = DISEASE.Disease class_class_curie: ClassVar[str] = "disease:Disease" class_name: ClassVar[str] = "Disease" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Disease - clinicalTnmFinding: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() - diseaseStage: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() + clinicalTnmFinding: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() + diseaseStage: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() excluded: Optional[Union[bool, Bool]] = None laterality: Optional[Union[dict, OntologyClass]] = None onset: Optional[Union[dict, TimeElement]] = None @@ -630,7 +626,7 @@ class Disease(YAMLRoot): resolution: Optional[Union[dict, TimeElement]] = None term: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="clinicalTnmFinding", slot_type=OntologyClass, key_name="id", keyed=True) self._normalize_inlined_as_dict(slot_name="diseaseStage", slot_type=OntologyClass, key_name="id", keyed=True) @@ -658,7 +654,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Diagnosis(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INTERPRETATION.Diagnosis class_class_curie: ClassVar[str] = "interpretation:Diagnosis" @@ -666,9 +662,9 @@ class Diagnosis(YAMLRoot): class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Diagnosis disease: Optional[Union[dict, OntologyClass]] = None - genomicInterpretations: Optional[Union[Union[dict, "GenomicInterpretation"], List[Union[dict, "GenomicInterpretation"]]]] = empty_list() + genomicInterpretations: Optional[Union[Union[dict, "GenomicInterpretation"], list[Union[dict, "GenomicInterpretation"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.disease is not None and not isinstance(self.disease, OntologyClass): self.disease = OntologyClass(**as_dict(self.disease)) @@ -685,7 +681,7 @@ class GenomicInterpretation(YAMLRoot): A statement about the contribution of a genomic element towards the observed phenotype. Note that this does not intend to encode any knowledge or results of specific computations. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INTERPRETATION.GenomicInterpretation class_class_curie: ClassVar[str] = "interpretation:GenomicInterpretation" @@ -697,7 +693,7 @@ class GenomicInterpretation(YAMLRoot): subjectOrBiosampleId: Optional[str] = None variantInterpretation: Optional[Union[dict, "VariantInterpretation"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.gene is not None and not isinstance(self.gene, GeneDescriptor): self.gene = GeneDescriptor(**as_dict(self.gene)) @@ -715,7 +711,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Interpretation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INTERPRETATION.Interpretation class_class_curie: ClassVar[str] = "interpretation:Interpretation" @@ -727,7 +723,7 @@ class Interpretation(YAMLRoot): progressStatus: Optional[Union[str, "ProgressStatus"]] = None summary: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.diagnosis is not None and not isinstance(self.diagnosis, Diagnosis): self.diagnosis = Diagnosis(**as_dict(self.diagnosis)) @@ -745,7 +741,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class VariantInterpretation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INTERPRETATION.VariantInterpretation class_class_curie: ClassVar[str] = "interpretation:VariantInterpretation" @@ -756,7 +752,7 @@ class VariantInterpretation(YAMLRoot): therapeuticActionability: Optional[Union[str, "TherapeuticActionability"]] = None variationDescriptor: Optional[Union[dict, "VariationDescriptor"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.acmgPathogenicityClassification is not None and not isinstance(self.acmgPathogenicityClassification, AcmgPathogenicityClassification): self.acmgPathogenicityClassification = AcmgPathogenicityClassification(self.acmgPathogenicityClassification) @@ -775,14 +771,14 @@ class Individual(YAMLRoot): An individual (or subject) typically corresponds to an individual human or another organism. FHIR mapping: Patient (https://www.hl7.org/fhir/patient.html). """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INDIVIDUAL.Individual class_class_curie: ClassVar[str] = "individual:Individual" class_name: ClassVar[str] = "Individual" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Individual - alternateIds: Optional[Union[str, List[str]]] = empty_list() + alternateIds: Optional[Union[str, list[str]]] = empty_list() dateOfBirth: Optional[str] = None gender: Optional[Union[dict, OntologyClass]] = None id: Optional[str] = None @@ -792,7 +788,7 @@ class Individual(YAMLRoot): timeAtLastEncounter: Optional[Union[dict, TimeElement]] = None vitalStatus: Optional[Union[dict, "VitalStatus"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.alternateIds, list): self.alternateIds = [self.alternateIds] if self.alternateIds is not None else [] self.alternateIds = [v if isinstance(v, str) else str(v) for v in self.alternateIds] @@ -826,7 +822,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class VitalStatus(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = INDIVIDUAL.VitalStatus class_class_curie: ClassVar[str] = "individual:VitalStatus" @@ -838,7 +834,7 @@ class VitalStatus(YAMLRoot): survivalTimeInDays: Optional[int] = None timeOfDeath: Optional[Union[dict, TimeElement]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.causeOfDeath is not None and not isinstance(self.causeOfDeath, OntologyClass): self.causeOfDeath = OntologyClass(**as_dict(self.causeOfDeath)) @@ -856,16 +852,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ComplexValue(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.ComplexValue class_class_curie: ClassVar[str] = "measurement:ComplexValue" class_name: ClassVar[str] = "ComplexValue" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.ComplexValue - typedQuantities: Optional[Union[Union[dict, "TypedQuantity"], List[Union[dict, "TypedQuantity"]]]] = empty_list() + typedQuantities: Optional[Union[Union[dict, "TypedQuantity"], list[Union[dict, "TypedQuantity"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.typedQuantities, list): self.typedQuantities = [self.typedQuantities] if self.typedQuantities is not None else [] self.typedQuantities = [v if isinstance(v, TypedQuantity) else TypedQuantity(**as_dict(v)) for v in self.typedQuantities] @@ -878,7 +874,7 @@ class Measurement(YAMLRoot): """ FHIR mapping: Observation (https://www.hl7.org/fhir/observation.html) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.Measurement class_class_curie: ClassVar[str] = "measurement:Measurement" @@ -892,7 +888,7 @@ class Measurement(YAMLRoot): timeObserved: Optional[Union[dict, TimeElement]] = None value: Optional[Union[dict, "Value"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.assay is not None and not isinstance(self.assay, OntologyClass): self.assay = OntologyClass(**as_dict(self.assay)) @@ -916,7 +912,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Quantity(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.Quantity class_class_curie: ClassVar[str] = "measurement:Quantity" @@ -927,7 +923,7 @@ class Quantity(YAMLRoot): unit: Optional[Union[dict, OntologyClass]] = None value: Optional[float] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.referenceRange is not None and not isinstance(self.referenceRange, ReferenceRange): self.referenceRange = ReferenceRange(**as_dict(self.referenceRange)) @@ -942,7 +938,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ReferenceRange(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.ReferenceRange class_class_curie: ClassVar[str] = "measurement:ReferenceRange" @@ -953,7 +949,7 @@ class ReferenceRange(YAMLRoot): low: Optional[float] = None unit: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.high is not None and not isinstance(self.high, float): self.high = float(self.high) @@ -972,7 +968,7 @@ class TypedQuantity(YAMLRoot): For complex measurements, such as blood pressure where more than one component quantity is required to describe the measurement """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.TypedQuantity class_class_curie: ClassVar[str] = "measurement:TypedQuantity" @@ -982,7 +978,7 @@ class TypedQuantity(YAMLRoot): quantity: Optional[Union[dict, Quantity]] = None type: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.quantity is not None and not isinstance(self.quantity, Quantity): self.quantity = Quantity(**as_dict(self.quantity)) @@ -994,7 +990,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Value(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEASUREMENT.Value class_class_curie: ClassVar[str] = "measurement:Value" @@ -1004,7 +1000,7 @@ class Value(YAMLRoot): ontologyClass: Optional[Union[dict, OntologyClass]] = None quantity: Optional[Union[dict, Quantity]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.ontologyClass is not None and not isinstance(self.ontologyClass, OntologyClass): self.ontologyClass = OntologyClass(**as_dict(self.ontologyClass)) @@ -1019,7 +1015,7 @@ class DoseInterval(YAMLRoot): """ e.g. 50mg/ml 3 times daily for two weeks """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEDICAL_ACTION.DoseInterval class_class_curie: ClassVar[str] = "medical_action:DoseInterval" @@ -1030,7 +1026,7 @@ class DoseInterval(YAMLRoot): quantity: Optional[Union[dict, Quantity]] = None scheduleFrequency: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.interval is not None and not isinstance(self.interval, TimeInterval): self.interval = TimeInterval(**as_dict(self.interval)) @@ -1048,14 +1044,14 @@ class MedicalAction(YAMLRoot): """ medication, procedure, other actions taken for clinical management """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEDICAL_ACTION.MedicalAction class_class_curie: ClassVar[str] = "medical_action:MedicalAction" class_name: ClassVar[str] = "MedicalAction" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.MedicalAction - adverseEvents: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() + adverseEvents: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() procedure: Optional[Union[dict, Procedure]] = None radiationTherapy: Optional[Union[dict, "RadiationTherapy"]] = None responseToTreatment: Optional[Union[dict, OntologyClass]] = None @@ -1065,7 +1061,7 @@ class MedicalAction(YAMLRoot): treatmentTarget: Optional[Union[dict, OntologyClass]] = None treatmentTerminationReason: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="adverseEvents", slot_type=OntologyClass, key_name="id", keyed=True) if self.procedure is not None and not isinstance(self.procedure, Procedure): @@ -1100,7 +1096,7 @@ class RadiationTherapy(YAMLRoot): """ RadiationTherapy """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEDICAL_ACTION.RadiationTherapy class_class_curie: ClassVar[str] = "medical_action:RadiationTherapy" @@ -1112,7 +1108,7 @@ class RadiationTherapy(YAMLRoot): fractions: int = None modality: Union[dict, OntologyClass] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.bodySite): self.MissingRequiredField("bodySite") if not isinstance(self.bodySite, OntologyClass): @@ -1141,7 +1137,7 @@ class TherapeuticRegimen(YAMLRoot): """ ARGO mapping radiation::radiation_therapy_type (missing) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEDICAL_ACTION.TherapeuticRegimen class_class_curie: ClassVar[str] = "medical_action:TherapeuticRegimen" @@ -1154,7 +1150,7 @@ class TherapeuticRegimen(YAMLRoot): regimenStatus: Optional[Union[str, "RegimenStatus"]] = None startTime: Optional[Union[dict, TimeElement]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.endTime is not None and not isinstance(self.endTime, TimeElement): self.endTime = TimeElement(**as_dict(self.endTime)) @@ -1178,7 +1174,7 @@ class Treatment(YAMLRoot): """ ARGO mapping treatment::is_primary_treatment (missing) treatment with an agent, such as a drug """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = MEDICAL_ACTION.Treatment class_class_curie: ClassVar[str] = "medical_action:Treatment" @@ -1187,11 +1183,11 @@ class Treatment(YAMLRoot): agent: Optional[Union[dict, OntologyClass]] = None cumulativeDose: Optional[Union[dict, Quantity]] = None - doseIntervals: Optional[Union[Union[dict, DoseInterval], List[Union[dict, DoseInterval]]]] = empty_list() + doseIntervals: Optional[Union[Union[dict, DoseInterval], list[Union[dict, DoseInterval]]]] = empty_list() drugType: Optional[Union[str, "DrugType"]] = None routeOfAdministration: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.agent is not None and not isinstance(self.agent, OntologyClass): self.agent = OntologyClass(**as_dict(self.agent)) @@ -1213,7 +1209,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class MetaData(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = META_DATA.MetaData class_class_curie: ClassVar[str] = "meta_data:MetaData" @@ -1222,13 +1218,13 @@ class MetaData(YAMLRoot): created: Optional[str] = None createdBy: Optional[str] = None - externalReferences: Optional[Union[Union[dict, ExternalReference], List[Union[dict, ExternalReference]]]] = empty_list() + externalReferences: Optional[Union[Union[dict, ExternalReference], list[Union[dict, ExternalReference]]]] = empty_list() phenopacketSchemaVersion: Optional[str] = None - resources: Optional[Union[Union[dict, "Resource"], List[Union[dict, "Resource"]]]] = empty_list() + resources: Optional[Union[Union[dict, "Resource"], list[Union[dict, "Resource"]]]] = empty_list() submittedBy: Optional[str] = None - updates: Optional[Union[Union[dict, "Update"], List[Union[dict, "Update"]]]] = empty_list() + updates: Optional[Union[Union[dict, "Update"], list[Union[dict, "Update"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.created is not None and not isinstance(self.created, str): self.created = str(self.created) @@ -1260,7 +1256,7 @@ class Resource(YAMLRoot): Description of an external resource used for referencing an object. For example the resource may be an ontology such as the HPO or SNOMED. FHIR mapping: CodeSystem (http://www.hl7.org/fhir/codesystem.html) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = META_DATA.Resource class_class_curie: ClassVar[str] = "meta_data:Resource" @@ -1274,7 +1270,7 @@ class Resource(YAMLRoot): url: Optional[str] = None version: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is not None and not isinstance(self.id, str): self.id = str(self.id) @@ -1302,7 +1298,7 @@ class Update(YAMLRoot): Information about when an update to a record occurred, who or what made the update and any pertinent information regarding the content and/or reason for the update """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = META_DATA.Update class_class_curie: ClassVar[str] = "meta_data:Update" @@ -1313,7 +1309,7 @@ class Update(YAMLRoot): comment: Optional[str] = None updatedBy: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self._is_empty(self.timestamp): self.MissingRequiredField("timestamp") if not isinstance(self.timestamp, str): @@ -1333,16 +1329,16 @@ class Pedigree(YAMLRoot): """ https://software.broadinstitute.org/gatk/documentation/article?id=11016 """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PEDIGREE.Pedigree class_class_curie: ClassVar[str] = "pedigree:Pedigree" class_name: ClassVar[str] = "Pedigree" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Pedigree - persons: Optional[Union[Union[dict, "Person"], List[Union[dict, "Person"]]]] = empty_list() + persons: Optional[Union[Union[dict, "Person"], list[Union[dict, "Person"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.persons, list): self.persons = [self.persons] if self.persons is not None else [] self.persons = [v if isinstance(v, Person) else Person(**as_dict(v)) for v in self.persons] @@ -1352,7 +1348,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Person(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PEDIGREE.Person class_class_curie: ClassVar[str] = "pedigree:Person" @@ -1366,7 +1362,7 @@ class Person(YAMLRoot): paternalId: Optional[str] = None sex: Optional[Union[str, "Sex"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.affectedStatus is not None and not isinstance(self.affectedStatus, AffectedStatus): self.affectedStatus = AffectedStatus(self.affectedStatus) @@ -1395,7 +1391,7 @@ class PhenotypicFeature(YAMLRoot): and frequency FHIR mapping: Condition (https://www.hl7.org/fhir/condition.html) or Observation (https://www.hl7.org/fhir/observation.html) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = PHENOTYPIC_FEATURE.PhenotypicFeature class_class_curie: ClassVar[str] = "phenotypic_feature:PhenotypicFeature" @@ -1403,15 +1399,15 @@ class PhenotypicFeature(YAMLRoot): class_model_uri: ClassVar[URIRef] = PHENOPACKETS.PhenotypicFeature description: Optional[str] = None - evidence: Optional[Union[Union[dict, Evidence], List[Union[dict, Evidence]]]] = empty_list() + evidence: Optional[Union[Union[dict, Evidence], list[Union[dict, Evidence]]]] = empty_list() excluded: Optional[Union[bool, Bool]] = None - modifiers: Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]] = empty_dict() + modifiers: Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]] = empty_dict() onset: Optional[Union[dict, TimeElement]] = None resolution: Optional[Union[dict, TimeElement]] = None severity: Optional[Union[dict, OntologyClass]] = None type: Optional[Union[dict, OntologyClass]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.description is not None and not isinstance(self.description, str): self.description = str(self.description) @@ -1477,7 +1473,7 @@ class Timestamp(YAMLRoot): http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this format. """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = TIMESTAMP.Timestamp class_class_curie: ClassVar[str] = "timestamp:Timestamp" @@ -1487,7 +1483,7 @@ class Timestamp(YAMLRoot): nanos: Optional[int] = None seconds: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.nanos is not None and not isinstance(self.nanos, int): self.nanos = int(self.nanos) @@ -1502,7 +1498,7 @@ class Expression(YAMLRoot): """ https://vrsatile.readthedocs.io/en/latest/value_object_descriptor/vod_index.html#expression """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRSATILE.Expression class_class_curie: ClassVar[str] = "vrsatile:Expression" @@ -1513,7 +1509,7 @@ class Expression(YAMLRoot): value: Optional[str] = None version: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.syntax is not None and not isinstance(self.syntax, str): self.syntax = str(self.syntax) @@ -1531,7 +1527,7 @@ class Extension(YAMLRoot): """ https://vrsatile.readthedocs.io/en/latest/value_object_descriptor/vod_index.html#extension """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRSATILE.Extension class_class_curie: ClassVar[str] = "vrsatile:Extension" @@ -1539,9 +1535,9 @@ class Extension(YAMLRoot): class_model_uri: ClassVar[URIRef] = PHENOPACKETS.Extension name: Optional[str] = None - value: Optional[Union[Union[dict, "Any"], List[Union[dict, "Any"]]]] = empty_list() + value: Optional[Union[Union[dict, "Any"], list[Union[dict, "Any"]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.name is not None and not isinstance(self.name, str): self.name = str(self.name) @@ -1557,21 +1553,21 @@ class GeneDescriptor(YAMLRoot): """ https://vrsatile.readthedocs.io/en/latest/value_object_descriptor/vod_index.html#gene-descriptor """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRSATILE.GeneDescriptor class_class_curie: ClassVar[str] = "vrsatile:GeneDescriptor" class_name: ClassVar[str] = "GeneDescriptor" class_model_uri: ClassVar[URIRef] = PHENOPACKETS.GeneDescriptor - alternateIds: Optional[Union[str, List[str]]] = empty_list() - alternateSymbols: Optional[Union[str, List[str]]] = empty_list() + alternateIds: Optional[Union[str, list[str]]] = empty_list() + alternateSymbols: Optional[Union[str, list[str]]] = empty_list() description: Optional[str] = None symbol: Optional[str] = None valueId: Optional[str] = None - xrefs: Optional[Union[str, List[str]]] = empty_list() + xrefs: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.alternateIds, list): self.alternateIds = [self.alternateIds] if self.alternateIds is not None else [] self.alternateIds = [v if isinstance(v, str) else str(v) for v in self.alternateIds] @@ -1598,7 +1594,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class VariationDescriptor(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRSATILE.VariationDescriptor class_class_curie: ClassVar[str] = "vrsatile:VariationDescriptor" @@ -1606,10 +1602,10 @@ class VariationDescriptor(YAMLRoot): class_model_uri: ClassVar[URIRef] = PHENOPACKETS.VariationDescriptor allelicState: Optional[Union[dict, OntologyClass]] = None - alternateLabels: Optional[Union[str, List[str]]] = empty_list() + alternateLabels: Optional[Union[str, list[str]]] = empty_list() description: Optional[str] = None - expressions: Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]] = empty_list() - extensions: Optional[Union[Union[dict, Extension], List[Union[dict, Extension]]]] = empty_list() + expressions: Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]] = empty_list() + extensions: Optional[Union[Union[dict, Extension], list[Union[dict, Extension]]]] = empty_list() geneContext: Optional[Union[dict, GeneDescriptor]] = None id: Optional[str] = None label: Optional[str] = None @@ -1618,9 +1614,9 @@ class VariationDescriptor(YAMLRoot): variation: Optional[Union[dict, "Variation"]] = None vcfRecord: Optional[Union[dict, "VcfRecord"]] = None vrsRefAlleleSeq: Optional[str] = None - xrefs: Optional[Union[str, List[str]]] = empty_list() + xrefs: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.allelicState is not None and not isinstance(self.allelicState, OntologyClass): self.allelicState = OntologyClass(**as_dict(self.allelicState)) @@ -1672,7 +1668,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class VcfRecord(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRSATILE.VcfRecord class_class_curie: ClassVar[str] = "vrsatile:VcfRecord" @@ -1689,7 +1685,7 @@ class VcfRecord(YAMLRoot): qual: Optional[str] = None ref: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.alt is not None and not isinstance(self.alt, str): self.alt = str(self.alt) @@ -1741,7 +1737,7 @@ class Any(YAMLRoot): adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = ANY.Any class_class_curie: ClassVar[str] = "any:Any" @@ -1751,7 +1747,7 @@ class Any(YAMLRoot): typeUrl: Optional[str] = None value: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.typeUrl is not None and not isinstance(self.typeUrl, str): self.typeUrl = str(self.typeUrl) @@ -1763,7 +1759,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Abundance(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Abundance class_class_curie: ClassVar[str] = "vrs:Abundance" @@ -1772,7 +1768,7 @@ class Abundance(YAMLRoot): copyNumber: Optional[Union[dict, "CopyNumber"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.copyNumber is not None and not isinstance(self.copyNumber, CopyNumber): self.copyNumber = CopyNumber(**as_dict(self.copyNumber)) @@ -1781,7 +1777,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Allele(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Allele class_class_curie: ClassVar[str] = "vrs:Allele" @@ -1796,7 +1792,7 @@ class Allele(YAMLRoot): repeatedSequenceExpression: Optional[Union[dict, "RepeatedSequenceExpression"]] = None sequenceLocation: Optional[Union[dict, "SequenceLocation"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.chromosomeLocation is not None and not isinstance(self.chromosomeLocation, ChromosomeLocation): self.chromosomeLocation = ChromosomeLocation(**as_dict(self.chromosomeLocation)) @@ -1823,7 +1819,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class ChromosomeLocation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.ChromosomeLocation class_class_curie: ClassVar[str] = "vrs:ChromosomeLocation" @@ -1835,7 +1831,7 @@ class ChromosomeLocation(YAMLRoot): interval: Optional[Union[dict, "CytobandInterval"]] = None speciesId: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.chr is not None and not isinstance(self.chr, str): self.chr = str(self.chr) @@ -1853,7 +1849,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class CopyNumber(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.CopyNumber class_class_curie: ClassVar[str] = "vrs:CopyNumber" @@ -1872,7 +1868,7 @@ class CopyNumber(YAMLRoot): number: Optional[Union[dict, "Number"]] = None repeatedSequenceExpression: Optional[Union[dict, "RepeatedSequenceExpression"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.allele is not None and not isinstance(self.allele, Allele): self.allele = Allele(**as_dict(self.allele)) @@ -1911,7 +1907,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class CytobandInterval(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.CytobandInterval class_class_curie: ClassVar[str] = "vrs:CytobandInterval" @@ -1921,7 +1917,7 @@ class CytobandInterval(YAMLRoot): end: Optional[str] = None start: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.end is not None and not isinstance(self.end, str): self.end = str(self.end) @@ -1933,7 +1929,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class DefiniteRange(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.DefiniteRange class_class_curie: ClassVar[str] = "vrs:DefiniteRange" @@ -1943,7 +1939,7 @@ class DefiniteRange(YAMLRoot): max: Optional[int] = None min: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.max is not None and not isinstance(self.max, int): self.max = int(self.max) @@ -1955,7 +1951,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class DerivedSequenceExpression(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.DerivedSequenceExpression class_class_curie: ClassVar[str] = "vrs:DerivedSequenceExpression" @@ -1965,7 +1961,7 @@ class DerivedSequenceExpression(YAMLRoot): location: Optional[Union[dict, "SequenceLocation"]] = None reverseComplement: Optional[Union[bool, Bool]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.location is not None and not isinstance(self.location, SequenceLocation): self.location = SequenceLocation(**as_dict(self.location)) @@ -1977,7 +1973,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Feature(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Feature class_class_curie: ClassVar[str] = "vrs:Feature" @@ -1986,7 +1982,7 @@ class Feature(YAMLRoot): gene: Optional[Union[dict, "Gene"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.gene is not None and not isinstance(self.gene, Gene): self.gene = Gene(**as_dict(self.gene)) @@ -1995,7 +1991,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Gene(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Gene class_class_curie: ClassVar[str] = "vrs:Gene" @@ -2004,7 +2000,7 @@ class Gene(YAMLRoot): geneId: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.geneId is not None and not isinstance(self.geneId, str): self.geneId = str(self.geneId) @@ -2012,7 +2008,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): class Haplotype(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Haplotype class_class_curie: ClassVar[str] = "vrs:Haplotype" @@ -2022,7 +2018,7 @@ class Haplotype(YAMLRoot): @dataclass class IndefiniteRange(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.IndefiniteRange class_class_curie: ClassVar[str] = "vrs:IndefiniteRange" @@ -2032,7 +2028,7 @@ class IndefiniteRange(YAMLRoot): comparator: Optional[str] = None value: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.comparator is not None and not isinstance(self.comparator, str): self.comparator = str(self.comparator) @@ -2044,7 +2040,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class LiteralSequenceExpression(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.LiteralSequenceExpression class_class_curie: ClassVar[str] = "vrs:LiteralSequenceExpression" @@ -2053,7 +2049,7 @@ class LiteralSequenceExpression(YAMLRoot): sequence: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.sequence is not None and not isinstance(self.sequence, str): self.sequence = str(self.sequence) @@ -2062,7 +2058,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Location(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Location class_class_curie: ClassVar[str] = "vrs:Location" @@ -2072,7 +2068,7 @@ class Location(YAMLRoot): chromosomeLocation: Optional[Union[dict, ChromosomeLocation]] = None sequenceLocation: Optional[Union[dict, "SequenceLocation"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.chromosomeLocation is not None and not isinstance(self.chromosomeLocation, ChromosomeLocation): self.chromosomeLocation = ChromosomeLocation(**as_dict(self.chromosomeLocation)) @@ -2084,7 +2080,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Member(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Member class_class_curie: ClassVar[str] = "vrs:Member" @@ -2096,11 +2092,11 @@ class Member(YAMLRoot): curie: Optional[str] = None haplotype: Optional[Union[dict, Haplotype]] = None id: Optional[str] = None - members: Optional[Union[Union[dict, "Member"], List[Union[dict, "Member"]]]] = empty_list() + members: Optional[Union[Union[dict, "Member"], list[Union[dict, "Member"]]]] = empty_list() text: Optional[Union[dict, "Text"]] = None variationSet: Optional[Union[dict, "VariationSet"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.allele is not None and not isinstance(self.allele, Allele): self.allele = Allele(**as_dict(self.allele)) @@ -2131,7 +2127,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class MolecularVariation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.MolecularVariation class_class_curie: ClassVar[str] = "vrs:MolecularVariation" @@ -2141,7 +2137,7 @@ class MolecularVariation(YAMLRoot): allele: Optional[Union[dict, Allele]] = None haplotype: Optional[Union[dict, Haplotype]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.allele is not None and not isinstance(self.allele, Allele): self.allele = Allele(**as_dict(self.allele)) @@ -2153,7 +2149,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Number(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Number class_class_curie: ClassVar[str] = "vrs:Number" @@ -2162,7 +2158,7 @@ class Number(YAMLRoot): value: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.value is not None and not isinstance(self.value, int): self.value = int(self.value) @@ -2171,7 +2167,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class RepeatedSequenceExpression(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.RepeatedSequenceExpression class_class_curie: ClassVar[str] = "vrs:RepeatedSequenceExpression" @@ -2184,7 +2180,7 @@ class RepeatedSequenceExpression(YAMLRoot): literalSequenceExpression: Optional[Union[dict, LiteralSequenceExpression]] = None number: Optional[Union[dict, Number]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.definiteRange is not None and not isinstance(self.definiteRange, DefiniteRange): self.definiteRange = DefiniteRange(**as_dict(self.definiteRange)) @@ -2205,7 +2201,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SequenceExpression(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SequenceExpression class_class_curie: ClassVar[str] = "vrs:SequenceExpression" @@ -2216,7 +2212,7 @@ class SequenceExpression(YAMLRoot): literalSequenceExpression: Optional[Union[dict, LiteralSequenceExpression]] = None repeatedSequenceExpression: Optional[Union[dict, RepeatedSequenceExpression]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.derivedSequenceExpression is not None and not isinstance(self.derivedSequenceExpression, DerivedSequenceExpression): self.derivedSequenceExpression = DerivedSequenceExpression(**as_dict(self.derivedSequenceExpression)) @@ -2231,7 +2227,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SequenceInterval(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SequenceInterval class_class_curie: ClassVar[str] = "vrs:SequenceInterval" @@ -2245,7 +2241,7 @@ class SequenceInterval(YAMLRoot): startIndefiniteRange: Optional[Union[dict, IndefiniteRange]] = None startNumber: Optional[Union[dict, Number]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.endDefiniteRange is not None and not isinstance(self.endDefiniteRange, DefiniteRange): self.endDefiniteRange = DefiniteRange(**as_dict(self.endDefiniteRange)) @@ -2269,7 +2265,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SequenceLocation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SequenceLocation class_class_curie: ClassVar[str] = "vrs:SequenceLocation" @@ -2280,7 +2276,7 @@ class SequenceLocation(YAMLRoot): sequenceId: Optional[str] = None sequenceInterval: Optional[Union[dict, SequenceInterval]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is not None and not isinstance(self.id, str): self.id = str(self.id) @@ -2295,7 +2291,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SequenceState(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SequenceState class_class_curie: ClassVar[str] = "vrs:SequenceState" @@ -2304,7 +2300,7 @@ class SequenceState(YAMLRoot): sequence: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.sequence is not None and not isinstance(self.sequence, str): self.sequence = str(self.sequence) @@ -2313,7 +2309,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SimpleInterval(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SimpleInterval class_class_curie: ClassVar[str] = "vrs:SimpleInterval" @@ -2323,7 +2319,7 @@ class SimpleInterval(YAMLRoot): end: Optional[int] = None start: Optional[int] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.end is not None and not isinstance(self.end, int): self.end = int(self.end) @@ -2335,7 +2331,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class SystemicVariation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.SystemicVariation class_class_curie: ClassVar[str] = "vrs:SystemicVariation" @@ -2344,7 +2340,7 @@ class SystemicVariation(YAMLRoot): copyNumber: Optional[Union[dict, CopyNumber]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.copyNumber is not None and not isinstance(self.copyNumber, CopyNumber): self.copyNumber = CopyNumber(**as_dict(self.copyNumber)) @@ -2353,7 +2349,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Text(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Text class_class_curie: ClassVar[str] = "vrs:Text" @@ -2363,7 +2359,7 @@ class Text(YAMLRoot): definition: Optional[str] = None id: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.definition is not None and not isinstance(self.definition, str): self.definition = str(self.definition) @@ -2375,7 +2371,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class UtilityVariation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.UtilityVariation class_class_curie: ClassVar[str] = "vrs:UtilityVariation" @@ -2385,7 +2381,7 @@ class UtilityVariation(YAMLRoot): text: Optional[Union[dict, Text]] = None variationSet: Optional[Union[dict, "VariationSet"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.text is not None and not isinstance(self.text, Text): self.text = Text(**as_dict(self.text)) @@ -2397,7 +2393,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Variation(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.Variation class_class_curie: ClassVar[str] = "vrs:Variation" @@ -2410,7 +2406,7 @@ class Variation(YAMLRoot): text: Optional[Union[dict, Text]] = None variationSet: Optional[Union[dict, "VariationSet"]] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.allele is not None and not isinstance(self.allele, Allele): self.allele = Allele(**as_dict(self.allele)) @@ -2430,7 +2426,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): class VariationSet(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = VRS.VariationSet class_class_curie: ClassVar[str] = "vrs:VariationSet" @@ -3097,13 +3093,13 @@ class slots: model_uri=PHENOPACKETS.cohort__description, domain=None, range=Optional[str]) slots.cohort__files = Slot(uri=PHENOPACKETS.files, name="cohort__files", curie=PHENOPACKETS.curie('files'), - model_uri=PHENOPACKETS.cohort__files, domain=None, range=Optional[Union[Union[dict, File], List[Union[dict, File]]]]) + model_uri=PHENOPACKETS.cohort__files, domain=None, range=Optional[Union[Union[dict, File], list[Union[dict, File]]]]) slots.cohort__id = Slot(uri=PHENOPACKETS.id, name="cohort__id", curie=PHENOPACKETS.curie('id'), model_uri=PHENOPACKETS.cohort__id, domain=None, range=Optional[str]) slots.cohort__members = Slot(uri=PHENOPACKETS.members, name="cohort__members", curie=PHENOPACKETS.curie('members'), - model_uri=PHENOPACKETS.cohort__members, domain=None, range=Optional[Union[Union[dict, Phenopacket], List[Union[dict, Phenopacket]]]]) + model_uri=PHENOPACKETS.cohort__members, domain=None, range=Optional[Union[Union[dict, Phenopacket], list[Union[dict, Phenopacket]]]]) slots.cohort__metaData = Slot(uri=PHENOPACKETS.metaData, name="cohort__metaData", curie=PHENOPACKETS.curie('metaData'), model_uri=PHENOPACKETS.cohort__metaData, domain=None, range=Union[dict, MetaData]) @@ -3112,7 +3108,7 @@ class slots: model_uri=PHENOPACKETS.family__consanguinousParents, domain=None, range=Optional[Union[bool, Bool]]) slots.family__files = Slot(uri=PHENOPACKETS.files, name="family__files", curie=PHENOPACKETS.curie('files'), - model_uri=PHENOPACKETS.family__files, domain=None, range=Optional[Union[Union[dict, File], List[Union[dict, File]]]]) + model_uri=PHENOPACKETS.family__files, domain=None, range=Optional[Union[Union[dict, File], list[Union[dict, File]]]]) slots.family__id = Slot(uri=PHENOPACKETS.id, name="family__id", curie=PHENOPACKETS.curie('id'), model_uri=PHENOPACKETS.family__id, domain=None, range=Optional[str]) @@ -3127,34 +3123,34 @@ class slots: model_uri=PHENOPACKETS.family__proband, domain=None, range=Optional[Union[dict, Phenopacket]]) slots.family__relatives = Slot(uri=PHENOPACKETS.relatives, name="family__relatives", curie=PHENOPACKETS.curie('relatives'), - model_uri=PHENOPACKETS.family__relatives, domain=None, range=Optional[Union[Union[dict, Phenopacket], List[Union[dict, Phenopacket]]]]) + model_uri=PHENOPACKETS.family__relatives, domain=None, range=Optional[Union[Union[dict, Phenopacket], list[Union[dict, Phenopacket]]]]) slots.phenopacket__biosamples = Slot(uri=PHENOPACKETS.biosamples, name="phenopacket__biosamples", curie=PHENOPACKETS.curie('biosamples'), - model_uri=PHENOPACKETS.phenopacket__biosamples, domain=None, range=Optional[Union[Union[dict, Biosample], List[Union[dict, Biosample]]]]) + model_uri=PHENOPACKETS.phenopacket__biosamples, domain=None, range=Optional[Union[Union[dict, Biosample], list[Union[dict, Biosample]]]]) slots.phenopacket__diseases = Slot(uri=PHENOPACKETS.diseases, name="phenopacket__diseases", curie=PHENOPACKETS.curie('diseases'), - model_uri=PHENOPACKETS.phenopacket__diseases, domain=None, range=Optional[Union[Union[dict, Disease], List[Union[dict, Disease]]]]) + model_uri=PHENOPACKETS.phenopacket__diseases, domain=None, range=Optional[Union[Union[dict, Disease], list[Union[dict, Disease]]]]) slots.phenopacket__files = Slot(uri=PHENOPACKETS.files, name="phenopacket__files", curie=PHENOPACKETS.curie('files'), - model_uri=PHENOPACKETS.phenopacket__files, domain=None, range=Optional[Union[Union[dict, File], List[Union[dict, File]]]]) + model_uri=PHENOPACKETS.phenopacket__files, domain=None, range=Optional[Union[Union[dict, File], list[Union[dict, File]]]]) slots.phenopacket__id = Slot(uri=PHENOPACKETS.id, name="phenopacket__id", curie=PHENOPACKETS.curie('id'), model_uri=PHENOPACKETS.phenopacket__id, domain=None, range=Optional[str]) slots.phenopacket__interpretations = Slot(uri=PHENOPACKETS.interpretations, name="phenopacket__interpretations", curie=PHENOPACKETS.curie('interpretations'), - model_uri=PHENOPACKETS.phenopacket__interpretations, domain=None, range=Optional[Union[Union[dict, Interpretation], List[Union[dict, Interpretation]]]]) + model_uri=PHENOPACKETS.phenopacket__interpretations, domain=None, range=Optional[Union[Union[dict, Interpretation], list[Union[dict, Interpretation]]]]) slots.phenopacket__measurements = Slot(uri=PHENOPACKETS.measurements, name="phenopacket__measurements", curie=PHENOPACKETS.curie('measurements'), - model_uri=PHENOPACKETS.phenopacket__measurements, domain=None, range=Optional[Union[Union[dict, Measurement], List[Union[dict, Measurement]]]]) + model_uri=PHENOPACKETS.phenopacket__measurements, domain=None, range=Optional[Union[Union[dict, Measurement], list[Union[dict, Measurement]]]]) slots.phenopacket__medicalActions = Slot(uri=PHENOPACKETS.medicalActions, name="phenopacket__medicalActions", curie=PHENOPACKETS.curie('medicalActions'), - model_uri=PHENOPACKETS.phenopacket__medicalActions, domain=None, range=Optional[Union[Union[dict, MedicalAction], List[Union[dict, MedicalAction]]]]) + model_uri=PHENOPACKETS.phenopacket__medicalActions, domain=None, range=Optional[Union[Union[dict, MedicalAction], list[Union[dict, MedicalAction]]]]) slots.phenopacket__metaData = Slot(uri=PHENOPACKETS.metaData, name="phenopacket__metaData", curie=PHENOPACKETS.curie('metaData'), model_uri=PHENOPACKETS.phenopacket__metaData, domain=None, range=Union[dict, MetaData]) slots.phenopacket__phenotypicFeatures = Slot(uri=PHENOPACKETS.phenotypicFeatures, name="phenopacket__phenotypicFeatures", curie=PHENOPACKETS.curie('phenotypicFeatures'), - model_uri=PHENOPACKETS.phenopacket__phenotypicFeatures, domain=None, range=Optional[Union[Union[dict, PhenotypicFeature], List[Union[dict, PhenotypicFeature]]]]) + model_uri=PHENOPACKETS.phenopacket__phenotypicFeatures, domain=None, range=Optional[Union[Union[dict, PhenotypicFeature], list[Union[dict, PhenotypicFeature]]]]) slots.phenopacket__subject = Slot(uri=PHENOPACKETS.subject, name="phenopacket__subject", curie=PHENOPACKETS.curie('subject'), model_uri=PHENOPACKETS.phenopacket__subject, domain=None, range=Optional[Union[dict, Individual]]) @@ -3244,10 +3240,10 @@ class slots: model_uri=PHENOPACKETS.biosample__description, domain=None, range=Optional[str]) slots.biosample__diagnosticMarkers = Slot(uri=PHENOPACKETS.diagnosticMarkers, name="biosample__diagnosticMarkers", curie=PHENOPACKETS.curie('diagnosticMarkers'), - model_uri=PHENOPACKETS.biosample__diagnosticMarkers, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.biosample__diagnosticMarkers, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.biosample__files = Slot(uri=PHENOPACKETS.files, name="biosample__files", curie=PHENOPACKETS.curie('files'), - model_uri=PHENOPACKETS.biosample__files, domain=None, range=Optional[Union[Union[dict, File], List[Union[dict, File]]]]) + model_uri=PHENOPACKETS.biosample__files, domain=None, range=Optional[Union[Union[dict, File], list[Union[dict, File]]]]) slots.biosample__histologicalDiagnosis = Slot(uri=PHENOPACKETS.histologicalDiagnosis, name="biosample__histologicalDiagnosis", curie=PHENOPACKETS.curie('histologicalDiagnosis'), model_uri=PHENOPACKETS.biosample__histologicalDiagnosis, domain=None, range=Optional[Union[dict, OntologyClass]]) @@ -3262,16 +3258,16 @@ class slots: model_uri=PHENOPACKETS.biosample__materialSample, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.biosample__measurements = Slot(uri=PHENOPACKETS.measurements, name="biosample__measurements", curie=PHENOPACKETS.curie('measurements'), - model_uri=PHENOPACKETS.biosample__measurements, domain=None, range=Optional[Union[Union[dict, Measurement], List[Union[dict, Measurement]]]]) + model_uri=PHENOPACKETS.biosample__measurements, domain=None, range=Optional[Union[Union[dict, Measurement], list[Union[dict, Measurement]]]]) slots.biosample__pathologicalStage = Slot(uri=PHENOPACKETS.pathologicalStage, name="biosample__pathologicalStage", curie=PHENOPACKETS.curie('pathologicalStage'), model_uri=PHENOPACKETS.biosample__pathologicalStage, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.biosample__pathologicalTnmFinding = Slot(uri=PHENOPACKETS.pathologicalTnmFinding, name="biosample__pathologicalTnmFinding", curie=PHENOPACKETS.curie('pathologicalTnmFinding'), - model_uri=PHENOPACKETS.biosample__pathologicalTnmFinding, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.biosample__pathologicalTnmFinding, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.biosample__phenotypicFeatures = Slot(uri=PHENOPACKETS.phenotypicFeatures, name="biosample__phenotypicFeatures", curie=PHENOPACKETS.curie('phenotypicFeatures'), - model_uri=PHENOPACKETS.biosample__phenotypicFeatures, domain=None, range=Optional[Union[Union[dict, PhenotypicFeature], List[Union[dict, PhenotypicFeature]]]]) + model_uri=PHENOPACKETS.biosample__phenotypicFeatures, domain=None, range=Optional[Union[Union[dict, PhenotypicFeature], list[Union[dict, PhenotypicFeature]]]]) slots.biosample__procedure = Slot(uri=PHENOPACKETS.procedure, name="biosample__procedure", curie=PHENOPACKETS.curie('procedure'), model_uri=PHENOPACKETS.biosample__procedure, domain=None, range=Optional[Union[dict, Procedure]]) @@ -3301,10 +3297,10 @@ class slots: model_uri=PHENOPACKETS.biosample__tumorProgression, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.disease__clinicalTnmFinding = Slot(uri=PHENOPACKETS.clinicalTnmFinding, name="disease__clinicalTnmFinding", curie=PHENOPACKETS.curie('clinicalTnmFinding'), - model_uri=PHENOPACKETS.disease__clinicalTnmFinding, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.disease__clinicalTnmFinding, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.disease__diseaseStage = Slot(uri=PHENOPACKETS.diseaseStage, name="disease__diseaseStage", curie=PHENOPACKETS.curie('diseaseStage'), - model_uri=PHENOPACKETS.disease__diseaseStage, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.disease__diseaseStage, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.disease__excluded = Slot(uri=PHENOPACKETS.excluded, name="disease__excluded", curie=PHENOPACKETS.curie('excluded'), model_uri=PHENOPACKETS.disease__excluded, domain=None, range=Optional[Union[bool, Bool]]) @@ -3328,7 +3324,7 @@ class slots: model_uri=PHENOPACKETS.diagnosis__disease, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.diagnosis__genomicInterpretations = Slot(uri=PHENOPACKETS.genomicInterpretations, name="diagnosis__genomicInterpretations", curie=PHENOPACKETS.curie('genomicInterpretations'), - model_uri=PHENOPACKETS.diagnosis__genomicInterpretations, domain=None, range=Optional[Union[Union[dict, GenomicInterpretation], List[Union[dict, GenomicInterpretation]]]]) + model_uri=PHENOPACKETS.diagnosis__genomicInterpretations, domain=None, range=Optional[Union[Union[dict, GenomicInterpretation], list[Union[dict, GenomicInterpretation]]]]) slots.genomicInterpretation__gene = Slot(uri=PHENOPACKETS.gene, name="genomicInterpretation__gene", curie=PHENOPACKETS.curie('gene'), model_uri=PHENOPACKETS.genomicInterpretation__gene, domain=None, range=Optional[Union[dict, GeneDescriptor]]) @@ -3364,7 +3360,7 @@ class slots: model_uri=PHENOPACKETS.variantInterpretation__variationDescriptor, domain=None, range=Optional[Union[dict, VariationDescriptor]]) slots.individual__alternateIds = Slot(uri=PHENOPACKETS.alternateIds, name="individual__alternateIds", curie=PHENOPACKETS.curie('alternateIds'), - model_uri=PHENOPACKETS.individual__alternateIds, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.individual__alternateIds, domain=None, range=Optional[Union[str, list[str]]]) slots.individual__dateOfBirth = Slot(uri=PHENOPACKETS.dateOfBirth, name="individual__dateOfBirth", curie=PHENOPACKETS.curie('dateOfBirth'), model_uri=PHENOPACKETS.individual__dateOfBirth, domain=None, range=Optional[str]) @@ -3403,7 +3399,7 @@ class slots: model_uri=PHENOPACKETS.vitalStatus__timeOfDeath, domain=None, range=Optional[Union[dict, TimeElement]]) slots.complexValue__typedQuantities = Slot(uri=PHENOPACKETS.typedQuantities, name="complexValue__typedQuantities", curie=PHENOPACKETS.curie('typedQuantities'), - model_uri=PHENOPACKETS.complexValue__typedQuantities, domain=None, range=Optional[Union[Union[dict, TypedQuantity], List[Union[dict, TypedQuantity]]]]) + model_uri=PHENOPACKETS.complexValue__typedQuantities, domain=None, range=Optional[Union[Union[dict, TypedQuantity], list[Union[dict, TypedQuantity]]]]) slots.measurement__assay = Slot(uri=PHENOPACKETS.assay, name="measurement__assay", curie=PHENOPACKETS.curie('assay'), model_uri=PHENOPACKETS.measurement__assay, domain=None, range=Optional[Union[dict, OntologyClass]]) @@ -3463,7 +3459,7 @@ class slots: model_uri=PHENOPACKETS.doseInterval__scheduleFrequency, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.medicalAction__adverseEvents = Slot(uri=PHENOPACKETS.adverseEvents, name="medicalAction__adverseEvents", curie=PHENOPACKETS.curie('adverseEvents'), - model_uri=PHENOPACKETS.medicalAction__adverseEvents, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.medicalAction__adverseEvents, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.medicalAction__procedure = Slot(uri=PHENOPACKETS.procedure, name="medicalAction__procedure", curie=PHENOPACKETS.curie('procedure'), model_uri=PHENOPACKETS.medicalAction__procedure, domain=None, range=Optional[Union[dict, Procedure]]) @@ -3523,7 +3519,7 @@ class slots: model_uri=PHENOPACKETS.treatment__cumulativeDose, domain=None, range=Optional[Union[dict, Quantity]]) slots.treatment__doseIntervals = Slot(uri=PHENOPACKETS.doseIntervals, name="treatment__doseIntervals", curie=PHENOPACKETS.curie('doseIntervals'), - model_uri=PHENOPACKETS.treatment__doseIntervals, domain=None, range=Optional[Union[Union[dict, DoseInterval], List[Union[dict, DoseInterval]]]]) + model_uri=PHENOPACKETS.treatment__doseIntervals, domain=None, range=Optional[Union[Union[dict, DoseInterval], list[Union[dict, DoseInterval]]]]) slots.treatment__drugType = Slot(uri=PHENOPACKETS.drugType, name="treatment__drugType", curie=PHENOPACKETS.curie('drugType'), model_uri=PHENOPACKETS.treatment__drugType, domain=None, range=Optional[Union[str, "DrugType"]]) @@ -3538,19 +3534,19 @@ class slots: model_uri=PHENOPACKETS.metaData__createdBy, domain=None, range=Optional[str]) slots.metaData__externalReferences = Slot(uri=PHENOPACKETS.externalReferences, name="metaData__externalReferences", curie=PHENOPACKETS.curie('externalReferences'), - model_uri=PHENOPACKETS.metaData__externalReferences, domain=None, range=Optional[Union[Union[dict, ExternalReference], List[Union[dict, ExternalReference]]]]) + model_uri=PHENOPACKETS.metaData__externalReferences, domain=None, range=Optional[Union[Union[dict, ExternalReference], list[Union[dict, ExternalReference]]]]) slots.metaData__phenopacketSchemaVersion = Slot(uri=PHENOPACKETS.phenopacketSchemaVersion, name="metaData__phenopacketSchemaVersion", curie=PHENOPACKETS.curie('phenopacketSchemaVersion'), model_uri=PHENOPACKETS.metaData__phenopacketSchemaVersion, domain=None, range=Optional[str]) slots.metaData__resources = Slot(uri=PHENOPACKETS.resources, name="metaData__resources", curie=PHENOPACKETS.curie('resources'), - model_uri=PHENOPACKETS.metaData__resources, domain=None, range=Optional[Union[Union[dict, Resource], List[Union[dict, Resource]]]]) + model_uri=PHENOPACKETS.metaData__resources, domain=None, range=Optional[Union[Union[dict, Resource], list[Union[dict, Resource]]]]) slots.metaData__submittedBy = Slot(uri=PHENOPACKETS.submittedBy, name="metaData__submittedBy", curie=PHENOPACKETS.curie('submittedBy'), model_uri=PHENOPACKETS.metaData__submittedBy, domain=None, range=Optional[str]) slots.metaData__updates = Slot(uri=PHENOPACKETS.updates, name="metaData__updates", curie=PHENOPACKETS.curie('updates'), - model_uri=PHENOPACKETS.metaData__updates, domain=None, range=Optional[Union[Union[dict, Update], List[Union[dict, Update]]]]) + model_uri=PHENOPACKETS.metaData__updates, domain=None, range=Optional[Union[Union[dict, Update], list[Union[dict, Update]]]]) slots.resource__id = Slot(uri=PHENOPACKETS.id, name="resource__id", curie=PHENOPACKETS.curie('id'), model_uri=PHENOPACKETS.resource__id, domain=None, range=Optional[str]) @@ -3580,7 +3576,7 @@ class slots: model_uri=PHENOPACKETS.update__updatedBy, domain=None, range=Optional[str]) slots.pedigree__persons = Slot(uri=PHENOPACKETS.persons, name="pedigree__persons", curie=PHENOPACKETS.curie('persons'), - model_uri=PHENOPACKETS.pedigree__persons, domain=None, range=Optional[Union[Union[dict, Person], List[Union[dict, Person]]]]) + model_uri=PHENOPACKETS.pedigree__persons, domain=None, range=Optional[Union[Union[dict, Person], list[Union[dict, Person]]]]) slots.person__affectedStatus = Slot(uri=PHENOPACKETS.affectedStatus, name="person__affectedStatus", curie=PHENOPACKETS.curie('affectedStatus'), model_uri=PHENOPACKETS.person__affectedStatus, domain=None, range=Optional[Union[str, "AffectedStatus"]]) @@ -3604,13 +3600,13 @@ class slots: model_uri=PHENOPACKETS.phenotypicFeature__description, domain=None, range=Optional[str]) slots.phenotypicFeature__evidence = Slot(uri=PHENOPACKETS.evidence, name="phenotypicFeature__evidence", curie=PHENOPACKETS.curie('evidence'), - model_uri=PHENOPACKETS.phenotypicFeature__evidence, domain=None, range=Optional[Union[Union[dict, Evidence], List[Union[dict, Evidence]]]]) + model_uri=PHENOPACKETS.phenotypicFeature__evidence, domain=None, range=Optional[Union[Union[dict, Evidence], list[Union[dict, Evidence]]]]) slots.phenotypicFeature__excluded = Slot(uri=PHENOPACKETS.excluded, name="phenotypicFeature__excluded", curie=PHENOPACKETS.curie('excluded'), model_uri=PHENOPACKETS.phenotypicFeature__excluded, domain=None, range=Optional[Union[bool, Bool]]) slots.phenotypicFeature__modifiers = Slot(uri=PHENOPACKETS.modifiers, name="phenotypicFeature__modifiers", curie=PHENOPACKETS.curie('modifiers'), - model_uri=PHENOPACKETS.phenotypicFeature__modifiers, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + model_uri=PHENOPACKETS.phenotypicFeature__modifiers, domain=None, range=Optional[Union[dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], list[Union[dict, OntologyClass]]]]) slots.phenotypicFeature__onset = Slot(uri=PHENOPACKETS.onset, name="phenotypicFeature__onset", curie=PHENOPACKETS.curie('onset'), model_uri=PHENOPACKETS.phenotypicFeature__onset, domain=None, range=Optional[Union[dict, TimeElement]]) @@ -3643,13 +3639,13 @@ class slots: model_uri=PHENOPACKETS.extension__name, domain=None, range=Optional[str]) slots.extension__value = Slot(uri=PHENOPACKETS.value, name="extension__value", curie=PHENOPACKETS.curie('value'), - model_uri=PHENOPACKETS.extension__value, domain=None, range=Optional[Union[Union[dict, Any], List[Union[dict, Any]]]]) + model_uri=PHENOPACKETS.extension__value, domain=None, range=Optional[Union[Union[dict, Any], list[Union[dict, Any]]]]) slots.geneDescriptor__alternateIds = Slot(uri=PHENOPACKETS.alternateIds, name="geneDescriptor__alternateIds", curie=PHENOPACKETS.curie('alternateIds'), - model_uri=PHENOPACKETS.geneDescriptor__alternateIds, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.geneDescriptor__alternateIds, domain=None, range=Optional[Union[str, list[str]]]) slots.geneDescriptor__alternateSymbols = Slot(uri=PHENOPACKETS.alternateSymbols, name="geneDescriptor__alternateSymbols", curie=PHENOPACKETS.curie('alternateSymbols'), - model_uri=PHENOPACKETS.geneDescriptor__alternateSymbols, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.geneDescriptor__alternateSymbols, domain=None, range=Optional[Union[str, list[str]]]) slots.geneDescriptor__description = Slot(uri=PHENOPACKETS.description, name="geneDescriptor__description", curie=PHENOPACKETS.curie('description'), model_uri=PHENOPACKETS.geneDescriptor__description, domain=None, range=Optional[str]) @@ -3661,22 +3657,22 @@ class slots: model_uri=PHENOPACKETS.geneDescriptor__valueId, domain=None, range=Optional[str]) slots.geneDescriptor__xrefs = Slot(uri=PHENOPACKETS.xrefs, name="geneDescriptor__xrefs", curie=PHENOPACKETS.curie('xrefs'), - model_uri=PHENOPACKETS.geneDescriptor__xrefs, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.geneDescriptor__xrefs, domain=None, range=Optional[Union[str, list[str]]]) slots.variationDescriptor__allelicState = Slot(uri=PHENOPACKETS.allelicState, name="variationDescriptor__allelicState", curie=PHENOPACKETS.curie('allelicState'), model_uri=PHENOPACKETS.variationDescriptor__allelicState, domain=None, range=Optional[Union[dict, OntologyClass]]) slots.variationDescriptor__alternateLabels = Slot(uri=PHENOPACKETS.alternateLabels, name="variationDescriptor__alternateLabels", curie=PHENOPACKETS.curie('alternateLabels'), - model_uri=PHENOPACKETS.variationDescriptor__alternateLabels, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.variationDescriptor__alternateLabels, domain=None, range=Optional[Union[str, list[str]]]) slots.variationDescriptor__description = Slot(uri=PHENOPACKETS.description, name="variationDescriptor__description", curie=PHENOPACKETS.curie('description'), model_uri=PHENOPACKETS.variationDescriptor__description, domain=None, range=Optional[str]) slots.variationDescriptor__expressions = Slot(uri=PHENOPACKETS.expressions, name="variationDescriptor__expressions", curie=PHENOPACKETS.curie('expressions'), - model_uri=PHENOPACKETS.variationDescriptor__expressions, domain=None, range=Optional[Union[Union[dict, Expression], List[Union[dict, Expression]]]]) + model_uri=PHENOPACKETS.variationDescriptor__expressions, domain=None, range=Optional[Union[Union[dict, Expression], list[Union[dict, Expression]]]]) slots.variationDescriptor__extensions = Slot(uri=PHENOPACKETS.extensions, name="variationDescriptor__extensions", curie=PHENOPACKETS.curie('extensions'), - model_uri=PHENOPACKETS.variationDescriptor__extensions, domain=None, range=Optional[Union[Union[dict, Extension], List[Union[dict, Extension]]]]) + model_uri=PHENOPACKETS.variationDescriptor__extensions, domain=None, range=Optional[Union[Union[dict, Extension], list[Union[dict, Extension]]]]) slots.variationDescriptor__geneContext = Slot(uri=PHENOPACKETS.geneContext, name="variationDescriptor__geneContext", curie=PHENOPACKETS.curie('geneContext'), model_uri=PHENOPACKETS.variationDescriptor__geneContext, domain=None, range=Optional[Union[dict, GeneDescriptor]]) @@ -3703,7 +3699,7 @@ class slots: model_uri=PHENOPACKETS.variationDescriptor__vrsRefAlleleSeq, domain=None, range=Optional[str]) slots.variationDescriptor__xrefs = Slot(uri=PHENOPACKETS.xrefs, name="variationDescriptor__xrefs", curie=PHENOPACKETS.curie('xrefs'), - model_uri=PHENOPACKETS.variationDescriptor__xrefs, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=PHENOPACKETS.variationDescriptor__xrefs, domain=None, range=Optional[Union[str, list[str]]]) slots.vcfRecord__alt = Slot(uri=PHENOPACKETS.alt, name="vcfRecord__alt", curie=PHENOPACKETS.curie('alt'), model_uri=PHENOPACKETS.vcfRecord__alt, domain=None, range=Optional[str]) @@ -3862,7 +3858,7 @@ class slots: model_uri=PHENOPACKETS.member__id, domain=None, range=Optional[str]) slots.member__members = Slot(uri=PHENOPACKETS.members, name="member__members", curie=PHENOPACKETS.curie('members'), - model_uri=PHENOPACKETS.member__members, domain=None, range=Optional[Union[Union[dict, Member], List[Union[dict, Member]]]]) + model_uri=PHENOPACKETS.member__members, domain=None, range=Optional[Union[Union[dict, Member], list[Union[dict, Member]]]]) slots.member__text = Slot(uri=PHENOPACKETS.text, name="member__text", curie=PHENOPACKETS.curie('text'), model_uri=PHENOPACKETS.member__text, domain=None, range=Optional[Union[dict, Text]]) diff --git a/tests/test_loaders_dumpers/models/termci_schema.py b/tests/test_loaders_dumpers/models/termci_schema.py index c80c5677..1f5a0e45 100644 --- a/tests/test_loaders_dumpers/models/termci_schema.py +++ b/tests/test_loaders_dumpers/models/termci_schema.py @@ -7,18 +7,13 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list, empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URI, URIorCURIE @@ -53,7 +48,7 @@ class ConceptReference(YAMLRoot): """ A minimal description of a class, individual, term or similar construct """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SKOS.Concept class_class_curie: ClassVar[str] = "skos:Concept" @@ -65,10 +60,10 @@ class ConceptReference(YAMLRoot): defined_in: Union[str, ConceptSystemNamespace] = None designation: Optional[str] = None definition: Optional[str] = None - reference: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() - narrower_than: Optional[Union[Union[str, ConceptReferenceUri], List[Union[str, ConceptReferenceUri]]]] = empty_list() + reference: Optional[Union[Union[str, URI], list[Union[str, URI]]]] = empty_list() + narrower_than: Optional[Union[Union[str, ConceptReferenceUri], list[Union[str, ConceptReferenceUri]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.uri is None: raise ValueError("uri must be supplied") if not isinstance(self.uri, ConceptReferenceUri): @@ -110,7 +105,7 @@ class ConceptSystem(YAMLRoot): """ A terminological resource (ontology, classification scheme, concept system, etc.) """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = SKOS.ConceptScheme class_class_curie: ClassVar[str] = "skos:ConceptScheme" @@ -120,11 +115,11 @@ class ConceptSystem(YAMLRoot): namespace: Union[str, ConceptSystemNamespace] = None prefix: str = None description: Optional[str] = None - reference: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() - root_concept: Optional[Union[Union[str, ConceptReferenceUri], List[Union[str, ConceptReferenceUri]]]] = empty_list() - contents: Optional[Union[Dict[Union[str, ConceptReferenceUri], Union[dict, ConceptReference]], List[Union[dict, ConceptReference]]]] = empty_dict() + reference: Optional[Union[Union[str, URI], list[Union[str, URI]]]] = empty_list() + root_concept: Optional[Union[Union[str, ConceptReferenceUri], list[Union[str, ConceptReferenceUri]]]] = empty_list() + contents: Optional[Union[dict[Union[str, ConceptReferenceUri], Union[dict, ConceptReference]], list[Union[dict, ConceptReference]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.namespace is None: raise ValueError("namespace must be supplied") if not isinstance(self.namespace, ConceptSystemNamespace): @@ -164,16 +159,16 @@ class Package(YAMLRoot): """ A collection of ConceptSystems """ - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = TERMCI.Package class_class_curie: ClassVar[str] = "termci:Package" class_name: ClassVar[str] = "Package" class_model_uri: ClassVar[URIRef] = TERMCI.Package - system: Optional[Union[Dict[Union[str, ConceptSystemNamespace], Union[dict, ConceptSystem]], List[Union[dict, ConceptSystem]]]] = empty_dict() + system: Optional[Union[dict[Union[str, ConceptSystemNamespace], Union[dict, ConceptSystem]], list[Union[dict, ConceptSystem]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.system is None: self.system = [] if not isinstance(self.system, (list, dict)): diff --git a/tests/test_loaders_dumpers/test_csv_tsv_loader_dumper.py b/tests/test_loaders_dumpers/test_csv_tsv_loader_dumper.py index 80dc5a5d..9e6f3300 100644 --- a/tests/test_loaders_dumpers/test_csv_tsv_loader_dumper.py +++ b/tests/test_loaders_dumpers/test_csv_tsv_loader_dumper.py @@ -3,16 +3,16 @@ import json import logging -from jsonasobj2 import as_json_obj, JsonObj +from jsonasobj2 import as_json_obj from linkml_runtime.dumpers import json_dumper, yaml_dumper from linkml_runtime.loaders import yaml_loader -from linkml_runtime.utils.formatutils import remove_empty_items, is_empty +from linkml_runtime.utils.formatutils import remove_empty_items from linkml_runtime.utils.schemaview import SchemaView from linkml_runtime.dumpers import csv_dumper, tsv_dumper from linkml_runtime.loaders import csv_loader, tsv_loader from linkml_runtime.utils.yamlutils import as_json_object -from tests.test_loaders_dumpers.models.books_normalized import Author, Review, Shop, Book, GenreEnum, BookSeries +from tests.test_loaders_dumpers.models.books_normalized import Author, Review, Shop, Book, BookSeries logger = logging.getLogger(__name__) diff --git a/tests/test_loaders_dumpers/test_dumpers_pydantic.py b/tests/test_loaders_dumpers/test_dumpers_pydantic.py index 429c54c4..5e39da73 100644 --- a/tests/test_loaders_dumpers/test_dumpers_pydantic.py +++ b/tests/test_loaders_dumpers/test_dumpers_pydantic.py @@ -2,7 +2,7 @@ import yaml -from linkml_runtime.dumpers import yaml_dumper, json_dumper, csv_dumper +from linkml_runtime.dumpers import yaml_dumper, json_dumper from tests.test_loaders_dumpers.loaderdumpertestcase import LoaderDumperTestCase from tests.test_loaders_dumpers.models.books_normalized_pydantic import Book, BookSeries, Author from linkml_runtime.utils.formatutils import remove_empty_items @@ -27,7 +27,7 @@ def test_yaml_dumper(self): self.dumps_test('book_series_lotr.yaml', lambda: yaml_dumper.dumps(self.bookseries)) # test contents of yaml file with cleaned dict made from bookseries instance in setup - with open(self.env.input_path('book_series_lotr.yaml'), 'r') as f: + with open(self.env.input_path('book_series_lotr.yaml')) as f: data = yaml.safe_load(f) # explicitly confirm that unset fields aren't written to the file for i in range(3): @@ -43,7 +43,7 @@ def test_json_dumper(self): self.dumps_test('book_series_lotr.json', lambda: json_dumper.dumps(self.bookseries)) # test contents of json file with cleaned dict made from bookseries instance in setup - with open(self.env.input_path('book_series_lotr.json'), 'r') as f: + with open(self.env.input_path('book_series_lotr.json')) as f: data = json.load(f) # explicitly confirm that unset fields aren't written to the file for i in range(3): diff --git a/tests/test_loaders_dumpers/test_enum.py b/tests/test_loaders_dumpers/test_enum.py index 7a7964c7..ed47a9e8 100644 --- a/tests/test_loaders_dumpers/test_enum.py +++ b/tests/test_loaders_dumpers/test_enum.py @@ -1,9 +1,8 @@ -import os import unittest import json import yaml -from linkml_runtime.loaders import json_loader, yaml_loader +from linkml_runtime.loaders import json_loader from linkml_runtime.dumpers import json_dumper, yaml_dumper from tests.test_loaders_dumpers.models.enum_model import Organism, StateEnum diff --git a/tests/test_loaders_dumpers/test_loaders.py b/tests/test_loaders_dumpers/test_loaders.py index 495f6d3e..af1e57fe 100644 --- a/tests/test_loaders_dumpers/test_loaders.py +++ b/tests/test_loaders_dumpers/test_loaders.py @@ -1,6 +1,6 @@ import os import unittest -from typing import Union, TextIO, Type, Optional +from typing import Union, TextIO, Optional from hbreader import FileInfo @@ -51,12 +51,12 @@ def test_rdf_loader(self): fmt = 'turtle' class RDFLoaderWrapper(RDFLoader): - def load(self, source: Union[str, dict, TextIO], target_class: Type[YAMLRoot], *, + def load(self, source: Union[str, dict, TextIO], target_class: type[YAMLRoot], *, base_dir: Optional[str] = None, metadata: Optional[FileInfo] = None, **_) -> YAMLRoot: return rdf_loader.load(source, target_class, base_dir=LoadersUnitTest.env.indir, fmt=fmt, metadata=metadata, contexts=contexts) - def loads(self, source: str, target_class: Type[YAMLRoot], *, metadata: Optional[FileInfo] = None, **_) \ + def loads(self, source: str, target_class: type[YAMLRoot], *, metadata: Optional[FileInfo] = None, **_) \ -> YAMLRoot: return rdf_loader.loads(source, target_class, contexts=contexts, fmt=fmt, metadata=metadata) diff --git a/tests/test_loaders_dumpers/test_loaders_dumpers.py b/tests/test_loaders_dumpers/test_loaders_dumpers.py index a48eb77c..2ecde131 100644 --- a/tests/test_loaders_dumpers/test_loaders_dumpers.py +++ b/tests/test_loaders_dumpers/test_loaders_dumpers.py @@ -5,8 +5,7 @@ from decimal import Decimal import yaml -from rdflib import Graph, Literal, URIRef -from rdflib.namespace import RDF, SKOS, XSD +from rdflib import Graph from rdflib import Namespace from linkml_runtime.loaders import json_loader @@ -15,7 +14,7 @@ from linkml_runtime.loaders import rdflib_loader from linkml_runtime.utils.schemaview import SchemaView from tests.test_loaders_dumpers import INPUT_DIR, OUTPUT_DIR -from tests.test_loaders_dumpers.models.personinfo import Container, Person, Address, Organization, OrganizationType +from tests.test_loaders_dumpers.models.personinfo import Container, Person from tests.test_loaders_dumpers.models.node_object import NodeObject, Triple logger = logging.getLogger(__name__) diff --git a/tests/test_loaders_dumpers/test_loaders_pydantic.py b/tests/test_loaders_dumpers/test_loaders_pydantic.py index 02f5e8b2..0c9c1f1d 100644 --- a/tests/test_loaders_dumpers/test_loaders_pydantic.py +++ b/tests/test_loaders_dumpers/test_loaders_pydantic.py @@ -1,6 +1,6 @@ import unittest -from linkml_runtime.loaders import yaml_loader, json_loader, rdf_loader +from linkml_runtime.loaders import yaml_loader, json_loader from tests.test_loaders_dumpers.environment import env from tests.test_loaders_dumpers.loaderdumpertestcase import LoaderDumperTestCase from tests.test_loaders_dumpers.models.books_normalized_pydantic import BookSeries diff --git a/tests/test_loaders_dumpers/test_rdflib_dumper.py b/tests/test_loaders_dumpers/test_rdflib_dumper.py index b5c3a4f0..67a68f85 100644 --- a/tests/test_loaders_dumpers/test_rdflib_dumper.py +++ b/tests/test_loaders_dumpers/test_rdflib_dumper.py @@ -1,4 +1,3 @@ -import json import os import unittest import logging diff --git a/tests/test_processing/test_referencevalidator.py b/tests/test_processing/test_referencevalidator.py index 7f813799..6f40799d 100644 --- a/tests/test_processing/test_referencevalidator.py +++ b/tests/test_processing/test_referencevalidator.py @@ -7,7 +7,7 @@ from decimal import Decimal from io import StringIO from pathlib import Path -from typing import Optional, Any, List, Union +from typing import Optional, Any, Union import yaml @@ -69,12 +69,12 @@ def italics(self, text: str): def w(self, text: str): self.writer.write(text) - def th(self, cols: List[str]): + def th(self, cols: list[str]): self.w("\n") self.tr(cols) self.tr(["---" for _ in cols]) - def tr(self, cols: List[str]): + def tr(self, cols: list[str]): self.w(f"|{'|'.join([str(c) for c in cols])}|\n") def __repr__(self) -> str: @@ -99,7 +99,7 @@ def _add_core_schema_elements( METASLOTS = ["range", "multivalued", "inlined", "inlined_as_list"] -def _slot_metaslot_values(slot: SlotDefinition) -> List[Any]: +def _slot_metaslot_values(slot: SlotDefinition) -> list[Any]: return [ slot.range or "string", slot.multivalued or False, diff --git a/tests/test_utils/input/inlined_as_dict.py b/tests/test_utils/input/inlined_as_dict.py index dc4a8d61..7f43820e 100644 --- a/tests/test_utils/input/inlined_as_dict.py +++ b/tests/test_utils/input/inlined_as_dict.py @@ -7,18 +7,13 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -57,7 +52,7 @@ class EInstS1(extended_str): @dataclass class EInst(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.EInst class_class_curie: ClassVar[str] = "ex:EInst" @@ -68,7 +63,7 @@ class EInst(YAMLRoot): s2: Optional[str] = None s3: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.s1 is None: raise ValueError("s1 must be supplied") if not isinstance(self.s1, EInstS1): @@ -85,16 +80,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class E(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.E class_class_curie: ClassVar[str] = "ex:E" class_name: ClassVar[str] = "E" class_model_uri: ClassVar[URIRef] = EX.E - ev: Optional[Union[Dict[Union[str, EInstS1], Union[dict, EInst]], List[Union[dict, EInst]]]] = empty_dict() + ev: Optional[Union[dict[Union[str, EInstS1], Union[dict, EInst]], list[Union[dict, EInst]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_dict(slot_name="ev", slot_type=EInst, key_name="s1", keyed=True) super().__post_init__(**kwargs) diff --git a/tests/test_utils/input/inlined_as_list.py b/tests/test_utils/input/inlined_as_list.py index bb2bcef7..1c91129b 100644 --- a/tests/test_utils/input/inlined_as_list.py +++ b/tests/test_utils/input/inlined_as_list.py @@ -7,18 +7,13 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from typing import Optional, List, Union, Dict, ClassVar, Any +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_dict +from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx -from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -57,7 +52,7 @@ class EInstS1(extended_str): @dataclass class EInst(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.EInst class_class_curie: ClassVar[str] = "ex:EInst" @@ -68,7 +63,7 @@ class EInst(YAMLRoot): s2: Optional[str] = None s3: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.s1 is None: raise ValueError("s1 must be supplied") if not isinstance(self.s1, EInstS1): @@ -85,16 +80,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class E(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.E class_class_curie: ClassVar[str] = "ex:E" class_name: ClassVar[str] = "E" class_model_uri: ClassVar[URIRef] = EX.E - ev: Optional[Union[Dict[Union[str, EInstS1], Union[dict, EInst]], List[Union[dict, EInst]]]] = empty_dict() + ev: Optional[Union[dict[Union[str, EInstS1], Union[dict, EInst]], list[Union[dict, EInst]]]] = empty_dict() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): self._normalize_inlined_as_list(slot_name="ev", slot_type=EInst, key_name="s1", keyed=True) super().__post_init__(**kwargs) diff --git a/tests/test_utils/model/inference_example.py b/tests/test_utils/model/inference_example.py index 3cbc5d3f..7be9c8a8 100644 --- a/tests/test_utils/model/inference_example.py +++ b/tests/test_utils/model/inference_example.py @@ -7,22 +7,19 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys -import re -from jsonasobj2 import JsonObj, as_dict -from typing import Optional, List, Union, Dict, ClassVar, Any +from jsonasobj2 import as_dict +from typing import Optional, Union, ClassVar, Any from dataclasses import dataclass -from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions +from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.metamodelcore import empty_list, empty_dict, bnode -from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int +from linkml_runtime.utils.metamodelcore import empty_list +from linkml_runtime.utils.yamlutils import YAMLRoot from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs -from linkml_runtime.utils.formatutils import camelcase, underscore, sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl -from rdflib import Namespace, URIRef +from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Boolean, Decimal, String +from linkml_runtime.linkml_model.types import Decimal from linkml_runtime.utils.metamodelcore import Bool, Decimal metamodel_version = "1.7.0" @@ -48,7 +45,7 @@ @dataclass class Term(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Term class_class_curie: ClassVar[str] = "ex:Term" @@ -57,9 +54,9 @@ class Term(YAMLRoot): id: Optional[str] = None name: Optional[str] = None - synonyms: Optional[Union[str, List[str]]] = empty_list() + synonyms: Optional[Union[str, list[str]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is not None and not isinstance(self.id, str): self.id = str(self.id) @@ -75,7 +72,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Person(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Person class_class_curie: ClassVar[str] = "ex:Person" @@ -97,7 +94,7 @@ class Person(YAMLRoot): derived_expression_from_spaces: Optional[str] = None summary: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.id is not None and not isinstance(self.id, str): self.id = str(self.id) @@ -145,7 +142,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Evil(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Evil class_class_curie: ClassVar[str] = "ex:Evil" @@ -154,7 +151,7 @@ class Evil(YAMLRoot): prohibited: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.prohibited is not None and not isinstance(self.prohibited, str): self.prohibited = str(self.prohibited) @@ -163,7 +160,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Relationship(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Relationship class_class_curie: ClassVar[str] = "ex:Relationship" @@ -176,7 +173,7 @@ class Relationship(YAMLRoot): description: Optional[str] = None description2: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.person1 is not None and not isinstance(self.person1, Person): self.person1 = Person(**as_dict(self.person1)) @@ -197,7 +194,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Address(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Address class_class_curie: ClassVar[str] = "ex:Address" @@ -207,7 +204,7 @@ class Address(YAMLRoot): street: Optional[str] = None city: Optional[str] = None - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if self.street is not None and not isinstance(self.street, str): self.street = str(self.street) @@ -219,16 +216,16 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass class Container(YAMLRoot): - _inherited_slots: ClassVar[List[str]] = [] + _inherited_slots: ClassVar[list[str]] = [] class_class_uri: ClassVar[URIRef] = EX.Container class_class_curie: ClassVar[str] = "ex:Container" class_name: ClassVar[str] = "Container" class_model_uri: ClassVar[URIRef] = EX.Container - persons: Optional[Union[Union[dict, Person], List[Union[dict, Person]]]] = empty_list() + persons: Optional[Union[Union[dict, Person], list[Union[dict, Person]]]] = empty_list() - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + def __post_init__(self, *_: list[str], **kwargs: dict[str, Any]): if not isinstance(self.persons, list): self.persons = [self.persons] if self.persons is not None else [] self.persons = [v if isinstance(v, Person) else Person(**as_dict(v)) for v in self.persons] @@ -258,7 +255,7 @@ class slots: model_uri=EX.name, domain=None, range=Optional[str]) slots.synonyms = Slot(uri=EX.synonyms, name="synonyms", curie=EX.curie('synonyms'), - model_uri=EX.synonyms, domain=None, range=Optional[Union[str, List[str]]]) + model_uri=EX.synonyms, domain=None, range=Optional[Union[str, list[str]]]) slots.full_name = Slot(uri=EX.full_name, name="full_name", curie=EX.curie('full_name'), model_uri=EX.full_name, domain=None, range=Optional[str]) @@ -327,7 +324,7 @@ class slots: model_uri=EX.relationship__description2, domain=None, range=Optional[str]) slots.container__persons = Slot(uri=EX.persons, name="container__persons", curie=EX.curie('persons'), - model_uri=EX.container__persons, domain=None, range=Optional[Union[Union[dict, Person], List[Union[dict, Person]]]]) + model_uri=EX.container__persons, domain=None, range=Optional[Union[Union[dict, Person], list[Union[dict, Person]]]]) slots.Person_description = Slot(uri=EX.description, name="Person_description", curie=EX.curie('description'), model_uri=EX.Person_description, domain=Person, range=Optional[str]) diff --git a/tests/test_utils/test_dict_utils.py b/tests/test_utils/test_dict_utils.py index 944f5f6e..e0beedce 100644 --- a/tests/test_utils/test_dict_utils.py +++ b/tests/test_utils/test_dict_utils.py @@ -1,6 +1,5 @@ import unittest -import yaml from linkml_runtime.linkml_model.meta import ClassDefinition, SlotDefinition, ElementName import linkml_runtime.utils.yamlutils as yutils diff --git a/tests/test_utils/test_distroutils.py b/tests/test_utils/test_distroutils.py index 9a2cc3a5..c7235dbb 100644 --- a/tests/test_utils/test_distroutils.py +++ b/tests/test_utils/test_distroutils.py @@ -1,8 +1,5 @@ -import os import unittest -import logging -from linkml_runtime.linkml_model import SchemaDefinition from linkml_runtime.utils.distroutils import get_jsonschema_string, get_schema_string diff --git a/tests/test_utils/test_eval_utils.py b/tests/test_utils/test_eval_utils.py index 500d79ac..83f082ab 100644 --- a/tests/test_utils/test_eval_utils.py +++ b/tests/test_utils/test_eval_utils.py @@ -1,5 +1,4 @@ from dataclasses import dataclass -from typing import List, Dict import pytest @@ -9,7 +8,7 @@ @dataclass class Person: name: str = None - aliases: List[str] = None + aliases: list[str] = None address: "Address" = None @@ -21,8 +20,8 @@ class Address: @dataclass class Container: name: str = None - persons: List[Person] = None - person_index: Dict[str, Person] = None + persons: list[Person] = None + person_index: dict[str, Person] = None def test_eval_expressions(): diff --git a/tests/test_utils/test_formatutils.py b/tests/test_utils/test_formatutils.py index 5107cd3d..46a45861 100644 --- a/tests/test_utils/test_formatutils.py +++ b/tests/test_utils/test_formatutils.py @@ -1,6 +1,6 @@ import json import unittest -from typing import List, Tuple, Any +from typing import Any from jsonasobj2 import JsonObj, as_json @@ -10,7 +10,7 @@ empty_things = [None, dict(), list(), JsonObj(), JsonObj({}), JsonObj([])] non_empty_things = [0, False, "", {'k': None}, {0:0}, [None], JsonObj(k=None), JsonObj(**{'k': None}), JsonObj([None])] -things_removed: List[Tuple[Any, Any]] = \ +things_removed: list[tuple[Any, Any]] = \ [(None, None), (dict(), {}), (list(), []), diff --git a/tests/test_utils/test_introspection.py b/tests/test_utils/test_introspection.py index ae0d6461..959d7ed2 100644 --- a/tests/test_utils/test_introspection.py +++ b/tests/test_utils/test_introspection.py @@ -1,6 +1,4 @@ -import os import unittest -import logging from linkml_runtime.linkml_model import SchemaDefinition from linkml_runtime.utils.introspection import package_schemaview, object_class_definition diff --git a/tests/test_utils/test_ruleutils.py b/tests/test_utils/test_ruleutils.py index 46157dbd..c1975985 100644 --- a/tests/test_utils/test_ruleutils.py +++ b/tests/test_utils/test_ruleutils.py @@ -1,9 +1,7 @@ import os import unittest -import logging from linkml_runtime.dumpers import yaml_dumper -from linkml_runtime.linkml_model.meta import SchemaDefinition, ClassDefinition, SlotDefinitionName from linkml_runtime.loaders.yaml_loader import YAMLLoader from linkml_runtime.utils.schemaview import SchemaView from linkml_runtime.utils.ruleutils import subclass_to_rules, get_range_as_disjunction diff --git a/tests/test_utils/test_schema_as_dict.py b/tests/test_utils/test_schema_as_dict.py index f9f2c53b..90ec7042 100644 --- a/tests/test_utils/test_schema_as_dict.py +++ b/tests/test_utils/test_schema_as_dict.py @@ -1,9 +1,8 @@ import os import unittest import logging -import yaml -from linkml_runtime.linkml_model.meta import SchemaDefinition, ClassDefinition +from linkml_runtime.linkml_model.meta import ClassDefinition from linkml_runtime.loaders.yaml_loader import YAMLLoader from linkml_runtime.utils.schema_as_dict import schema_as_yaml_dump, schema_as_dict from linkml_runtime.utils.schemaview import SchemaView diff --git a/tests/test_utils/test_schemaview.py b/tests/test_utils/test_schemaview.py index 8056ba9e..ba56087c 100644 --- a/tests/test_utils/test_schemaview.py +++ b/tests/test_utils/test_schemaview.py @@ -3,8 +3,6 @@ import logging from copy import copy from pathlib import Path -from typing import List -from unittest import TestCase from jsonasobj2 import JsonObj @@ -738,7 +736,7 @@ def test_traversal(self): view.add_class(ClassDefinition('BY', is_a='RootMixin', mixin=True)) view.add_class(ClassDefinition('CX', is_a='RootMixin', mixin=True)) - def check(ancs: List, expected: List): + def check(ancs: list, expected: list): self.assertEqual(ancs, expected) check(view.class_ancestors('C', depth_first=True), ['C', 'Cm1', 'Cm2', 'CX', 'B', 'Bm1', 'Bm2', 'BY', 'A', 'Am1', 'Am2', 'AZ', 'Root', 'RootMixin']) From de209514607f36b85b72816bf1a0ba6b0180c4d0 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Wed, 9 Oct 2024 01:09:41 -0700 Subject: [PATCH 2/9] dang i guess ruff really just failed at that check and also removed a bunch of actually used imports --- linkml_runtime/utils/csvutils.py | 2 +- linkml_runtime/utils/schemaview.py | 118 ++++++++++++++--------------- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/linkml_runtime/utils/csvutils.py b/linkml_runtime/utils/csvutils.py index 7813f078..b841d3ca 100644 --- a/linkml_runtime/utils/csvutils.py +++ b/linkml_runtime/utils/csvutils.py @@ -1,5 +1,5 @@ import logging -from json_flattener import KeyConfig, Serializer +from json_flattener import GlobalConfig, KeyConfig, Serializer from json_flattener.flattener import CONFIGMAP from linkml_runtime.linkml_model.meta import SlotDefinitionName, ClassDefinitionName from linkml_runtime.utils.schemaview import SchemaView diff --git a/linkml_runtime/utils/schemaview.py b/linkml_runtime/utils/schemaview.py index c3d15758..e353a842 100644 --- a/linkml_runtime/utils/schemaview.py +++ b/linkml_runtime/utils/schemaview.py @@ -13,7 +13,7 @@ from linkml_runtime.utils.namespaces import Namespaces from deprecated.classic import deprecated from linkml_runtime.utils.context_utils import parse_import_map, map_import -from linkml_runtime.utils.formatutils import is_empty +from linkml_runtime.utils.formatutils import is_empty, underscore, camelcase from linkml_runtime.utils.pattern import PatternResolver from linkml_runtime.linkml_model.meta import * from linkml_runtime.exceptions import OrderingError @@ -40,8 +40,8 @@ ElementNameType = TypeVar("ElementNameType", bound=Union[ElementName,str]) DefinitionType = TypeVar("DefinitionType", bound=Definition) DefinitionNameType = TypeVar("DefinitionNameType", bound=Union[DefinitionName,str]) -ElementDict = Dict[ElementNameType, ElementType] -DefDict = Dict[DefinitionNameType, DefinitionType] +ElementDict = dict[ElementNameType, ElementType] +DefDict = dict[DefinitionNameType, DefinitionType] class OrderedBy(Enum): @@ -140,7 +140,7 @@ class SchemaView: """ schema: SchemaDefinition = None - schema_map: Dict[SchemaDefinitionName, SchemaDefinition] = None + schema_map: dict[SchemaDefinitionName, SchemaDefinition] = None importmap: Optional[Mapping[str, str]] = None """Optional mapping between schema names and local paths/URLs""" modifications: int = 0 @@ -152,7 +152,7 @@ class SchemaView: def __init__(self, schema: Union[str, Path, SchemaDefinition], - importmap: Optional[Dict[str, str]] = None, merge_imports: bool = False, base_dir: str = None): + importmap: Optional[dict[str, str]] = None, merge_imports: bool = False, base_dir: str = None): if isinstance(schema, Path): schema = str(schema) if isinstance(schema, str): @@ -230,7 +230,7 @@ def load_import(self, imp: str, from_schema: SchemaDefinition = None): return schema @lru_cache(None) - def imports_closure(self, imports: bool = True, traverse: Optional[bool] = None, inject_metadata=True) -> List[SchemaDefinitionName]: + def imports_closure(self, imports: bool = True, traverse: Optional[bool] = None, inject_metadata=True) -> list[SchemaDefinitionName]: """ Return all imports @@ -327,7 +327,7 @@ def imports_closure(self, imports: bool = True, traverse: Optional[bool] = None, return closure @lru_cache(None) - def all_schema(self, imports: bool = True) -> List[SchemaDefinition]: + def all_schema(self, imports: bool = True) -> list[SchemaDefinition]: """ :param imports: include imports closure :return: all schemas @@ -337,7 +337,7 @@ def all_schema(self, imports: bool = True) -> List[SchemaDefinition]: @deprecated("Use `all_classes` instead") @lru_cache(None) - def all_class(self, imports=True) -> Dict[ClassDefinitionName, ClassDefinition]: + def all_class(self, imports=True) -> dict[ClassDefinitionName, ClassDefinition]: """ :param imports: include imports closure :return: all classes in schema view @@ -423,7 +423,7 @@ def _order_inheritance(self, elements: DefDict) -> DefDict: @lru_cache(None) - def all_classes(self, ordered_by=OrderedBy.PRESERVE, imports=True) -> Dict[ClassDefinitionName, ClassDefinition]: + def all_classes(self, ordered_by=OrderedBy.PRESERVE, imports=True) -> dict[ClassDefinitionName, ClassDefinition]: """ :param ordered_by: an enumerated parameter that returns all the classes in the order specified. :param imports: include imports closure @@ -435,7 +435,7 @@ def all_classes(self, ordered_by=OrderedBy.PRESERVE, imports=True) -> Dict[Class @deprecated("Use `all_slots` instead") @lru_cache(None) - def all_slot(self, **kwargs) -> Dict[SlotDefinitionName, SlotDefinition]: + def all_slot(self, **kwargs) -> dict[SlotDefinitionName, SlotDefinition]: """ :param imports: include imports closure :return: all slots in schema view @@ -443,7 +443,7 @@ def all_slot(self, **kwargs) -> Dict[SlotDefinitionName, SlotDefinition]: return self.all_slots(**kwargs) @lru_cache(None) - def all_slots(self, ordered_by=OrderedBy.PRESERVE, imports=True, attributes=True) -> Dict[ + def all_slots(self, ordered_by=OrderedBy.PRESERVE, imports=True, attributes=True) -> dict[ SlotDefinitionName, SlotDefinition]: """ :param ordered_by: an enumerated parameter that returns all the slots in the order specified. @@ -464,7 +464,7 @@ def all_slots(self, ordered_by=OrderedBy.PRESERVE, imports=True, attributes=True @deprecated("Use `all_enums` instead") @lru_cache(None) - def all_enum(self, imports=True) -> Dict[EnumDefinitionName, EnumDefinition]: + def all_enum(self, imports=True) -> dict[EnumDefinitionName, EnumDefinition]: """ :param imports: include imports closure :return: all enums in schema view @@ -472,7 +472,7 @@ def all_enum(self, imports=True) -> Dict[EnumDefinitionName, EnumDefinition]: return self._get_dict(ENUMS, imports) @lru_cache(None) - def all_enums(self, imports=True) -> Dict[EnumDefinitionName, EnumDefinition]: + def all_enums(self, imports=True) -> dict[EnumDefinitionName, EnumDefinition]: """ :param imports: include imports closure :return: all enums in schema view @@ -481,7 +481,7 @@ def all_enums(self, imports=True) -> Dict[EnumDefinitionName, EnumDefinition]: @deprecated("Use `all_types` instead") @lru_cache(None) - def all_type(self, imports=True) -> Dict[TypeDefinitionName, TypeDefinition]: + def all_type(self, imports=True) -> dict[TypeDefinitionName, TypeDefinition]: """ :param imports: include imports closure :return: all types in schema view @@ -489,7 +489,7 @@ def all_type(self, imports=True) -> Dict[TypeDefinitionName, TypeDefinition]: return self._get_dict(TYPES, imports) @lru_cache(None) - def all_types(self, imports=True) -> Dict[TypeDefinitionName, TypeDefinition]: + def all_types(self, imports=True) -> dict[TypeDefinitionName, TypeDefinition]: """ :param imports: include imports closure :return: all types in schema view @@ -497,7 +497,7 @@ def all_types(self, imports=True) -> Dict[TypeDefinitionName, TypeDefinition]: return self._get_dict(TYPES, imports) @deprecated("Use `all_subsets` instead") - def all_subset(self, imports=True) -> Dict[SubsetDefinitionName, SubsetDefinition]: + def all_subset(self, imports=True) -> dict[SubsetDefinitionName, SubsetDefinition]: """ :param imports: include imports closure :return: all subsets in schema view @@ -505,7 +505,7 @@ def all_subset(self, imports=True) -> Dict[SubsetDefinitionName, SubsetDefinitio return self._get_dict(SUBSETS, imports) @lru_cache(None) - def all_subsets(self, imports=True) -> Dict[SubsetDefinitionName, SubsetDefinition]: + def all_subsets(self, imports=True) -> dict[SubsetDefinitionName, SubsetDefinition]: """ :param imports: include imports closure :return: all subsets in schema view @@ -514,7 +514,7 @@ def all_subsets(self, imports=True) -> Dict[SubsetDefinitionName, SubsetDefiniti @deprecated("Use `all_elements` instead") @lru_cache(None) - def all_element(self, imports=True) -> Dict[ElementName, Element]: + def all_element(self, imports=True) -> dict[ElementName, Element]: """ :param imports: include imports closure :return: all elements in schema view @@ -528,7 +528,7 @@ def all_element(self, imports=True) -> Dict[ElementName, Element]: return {**all_classes, **all_slots, **all_enums, **all_types, **all_subsets} @lru_cache(None) - def all_elements(self, imports=True) -> Dict[ElementName, Element]: + def all_elements(self, imports=True) -> dict[ElementName, Element]: """ :param imports: include imports closure :return: all elements in schema view @@ -541,7 +541,7 @@ def all_elements(self, imports=True) -> Dict[ElementName, Element]: # {**a,**b} syntax merges dictionary a and b into a single dictionary, removing duplicates. return {**all_classes, **all_slots, **all_enums, **all_types, **all_subsets} - def _get_dict(self, slot_name: str, imports=True) -> Dict: + def _get_dict(self, slot_name: str, imports=True) -> dict: schemas = self.all_schema(imports) d = {} # pdb.set_trace() @@ -555,7 +555,7 @@ def _get_dict(self, slot_name: str, imports=True) -> Dict: return d @lru_cache(None) - def slot_name_mappings(self) -> Dict[str, SlotDefinition]: + def slot_name_mappings(self) -> dict[str, SlotDefinition]: """ Mapping between processed safe slot names (following naming conventions) and slots. @@ -569,7 +569,7 @@ def slot_name_mappings(self) -> Dict[str, SlotDefinition]: return m @lru_cache(None) - def class_name_mappings(self) -> Dict[str, ClassDefinition]: + def class_name_mappings(self) -> dict[str, ClassDefinition]: """ Mapping between processed safe class names (following naming conventions) and classes. @@ -594,7 +594,7 @@ def in_schema(self, element_name: ElementName) -> SchemaDefinitionName: return ix[element_name] @lru_cache(None) - def element_by_schema_map(self) -> Dict[ElementName, SchemaDefinitionName]: + def element_by_schema_map(self) -> dict[ElementName, SchemaDefinitionName]: ix = {} schemas = self.all_schema(True) for schema in schemas: @@ -681,7 +681,7 @@ def get_type(self, type_name: TYPE_NAME, imports=True, strict=False) -> TypeDefi else: return t - def _parents(self, e: Element, imports=True, mixins=True, is_a=True) -> List[ElementName]: + def _parents(self, e: Element, imports=True, mixins=True, is_a=True) -> list[ElementName]: if mixins: parents = copy(e.mixins) else: @@ -691,7 +691,7 @@ def _parents(self, e: Element, imports=True, mixins=True, is_a=True) -> List[Ele return parents @lru_cache(None) - def class_parents(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a=True) -> List[ClassDefinitionName]: + def class_parents(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a=True) -> list[ClassDefinitionName]: """ :param class_name: child class name :param imports: include import closure @@ -702,7 +702,7 @@ def class_parents(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a= return self._parents(cls, imports, mixins, is_a) @lru_cache(None) - def enum_parents(self, enum_name: ENUM_NAME, imports=False, mixins=False, is_a=True) -> List[EnumDefinitionName]: + def enum_parents(self, enum_name: ENUM_NAME, imports=False, mixins=False, is_a=True) -> list[EnumDefinitionName]: """ :param enum_name: child enum name :param imports: include import closure (False) @@ -764,7 +764,7 @@ def permissible_value_children(self, permissible_value: str, enum_name: ENUM_NAM raise ValueError(f'No such enum as "{enum_name}"') @lru_cache(None) - def slot_parents(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=True) -> List[SlotDefinitionName]: + def slot_parents(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=True) -> list[SlotDefinitionName]: """ :param slot_name: child slot name :param imports: include import closure @@ -778,7 +778,7 @@ def slot_parents(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=Tru return [] @lru_cache(None) - def type_parents(self, type_name: TYPE_NAME, imports=True) -> List[TypeDefinitionName]: + def type_parents(self, type_name: TYPE_NAME, imports=True) -> list[TypeDefinitionName]: """ :param type_name: child type name :param imports: include import closure @@ -791,7 +791,7 @@ def type_parents(self, type_name: TYPE_NAME, imports=True) -> List[TypeDefinitio return [] @lru_cache(None) - def get_children(self, name: str, mixin: bool = True) -> List[str]: + def get_children(self, name: str, mixin: bool = True) -> list[str]: """ get the children of an element (any class, slot, enum, type) :param name: name of the parent element @@ -808,7 +808,7 @@ def get_children(self, name: str, mixin: bool = True) -> List[str]: return children @lru_cache(None) - def class_children(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a=True) -> List[ClassDefinitionName]: + def class_children(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a=True) -> list[ClassDefinitionName]: """ :param class_name: parent class name :param imports: include import closure @@ -820,7 +820,7 @@ def class_children(self, class_name: CLASS_NAME, imports=True, mixins=True, is_a return [x.name for x in elts if (x.is_a == class_name and is_a) or (mixins and class_name in x.mixins)] @lru_cache(None) - def slot_children(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=True) -> List[SlotDefinitionName]: + def slot_children(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=True) -> list[SlotDefinitionName]: """ :param slot_name: parent slot name :param imports: include import closure @@ -833,7 +833,7 @@ def slot_children(self, slot_name: SLOT_NAME, imports=True, mixins=True, is_a=Tr @lru_cache(None) def class_ancestors(self, class_name: CLASS_NAME, imports=True, mixins=True, reflexive=True, is_a=True, - depth_first=True) -> List[ClassDefinitionName]: + depth_first=True) -> list[ClassDefinitionName]: """ Closure of class_parents method @@ -853,7 +853,7 @@ def class_ancestors(self, class_name: CLASS_NAME, imports=True, mixins=True, ref def permissible_value_ancestors(self, permissible_value_text: str, enum_name: ENUM_NAME, reflexive=True, - depth_first=True) -> List[str]: + depth_first=True) -> list[str]: """ Closure of permissible_value_parents method :enum @@ -868,7 +868,7 @@ def permissible_value_ancestors(self, permissible_value_text: str, def permissible_value_descendants(self, permissible_value_text: str, enum_name: ENUM_NAME, reflexive=True, - depth_first=True) -> List[str]: + depth_first=True) -> list[str]: """ Closure of permissible_value_children method :enum @@ -882,7 +882,7 @@ def permissible_value_descendants(self, permissible_value_text: str, @lru_cache(None) def enum_ancestors(self, enum_name: ENUM_NAME, imports=True, mixins=True, reflexive=True, is_a=True, - depth_first=True) -> List[EnumDefinitionName]: + depth_first=True) -> list[EnumDefinitionName]: """ Closure of enum_parents method @@ -899,7 +899,7 @@ def enum_ancestors(self, enum_name: ENUM_NAME, imports=True, mixins=True, reflex reflexive=reflexive, depth_first=depth_first) @lru_cache(None) - def type_ancestors(self, type_name: TYPES, imports=True, reflexive=True, depth_first=True) -> List[ + def type_ancestors(self, type_name: TYPES, imports=True, reflexive=True, depth_first=True) -> list[ TypeDefinitionName]: """ All ancestors of a type via typeof @@ -915,7 +915,7 @@ def type_ancestors(self, type_name: TYPES, imports=True, reflexive=True, depth_f reflexive=reflexive, depth_first=depth_first) @lru_cache(None) - def slot_ancestors(self, slot_name: SLOT_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> List[ + def slot_ancestors(self, slot_name: SLOT_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> list[ SlotDefinitionName]: """ Closure of slot_parents method @@ -932,7 +932,7 @@ def slot_ancestors(self, slot_name: SLOT_NAME, imports=True, mixins=True, reflex reflexive=reflexive) @lru_cache(None) - def class_descendants(self, class_name: CLASS_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> List[ + def class_descendants(self, class_name: CLASS_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> list[ ClassDefinitionName]: """ Closure of class_children method @@ -948,7 +948,7 @@ def class_descendants(self, class_name: CLASS_NAME, imports=True, mixins=True, r reflexive=reflexive) @lru_cache(None) - def slot_descendants(self, slot_name: SLOT_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> List[ + def slot_descendants(self, slot_name: SLOT_NAME, imports=True, mixins=True, reflexive=True, is_a=True) -> list[ SlotDefinitionName]: """ Closure of slot_children method @@ -964,7 +964,7 @@ def slot_descendants(self, slot_name: SLOT_NAME, imports=True, mixins=True, refl reflexive=reflexive) @lru_cache(None) - def class_roots(self, imports=True, mixins=True, is_a=True) -> List[ClassDefinitionName]: + def class_roots(self, imports=True, mixins=True, is_a=True) -> list[ClassDefinitionName]: """ All classes that have no parents :param imports: @@ -977,7 +977,7 @@ def class_roots(self, imports=True, mixins=True, is_a=True) -> List[ClassDefinit if self.class_parents(c, mixins=mixins, is_a=is_a, imports=imports) == []] @lru_cache(None) - def class_leaves(self, imports=True, mixins=True, is_a=True) -> List[ClassDefinitionName]: + def class_leaves(self, imports=True, mixins=True, is_a=True) -> list[ClassDefinitionName]: """ All classes that have no children :param imports: @@ -990,7 +990,7 @@ def class_leaves(self, imports=True, mixins=True, is_a=True) -> List[ClassDefini if self.class_children(c, mixins=mixins, is_a=is_a, imports=imports) == []] @lru_cache(None) - def slot_roots(self, imports=True, mixins=True) -> List[SlotDefinitionName]: + def slot_roots(self, imports=True, mixins=True) -> list[SlotDefinitionName]: """ All slotes that have no parents :param imports: @@ -1002,7 +1002,7 @@ def slot_roots(self, imports=True, mixins=True) -> List[SlotDefinitionName]: if self.slot_parents(c, mixins=mixins, imports=imports) == []] @lru_cache(None) - def slot_leaves(self, imports=True, mixins=True) -> List[SlotDefinitionName]: + def slot_leaves(self, imports=True, mixins=True) -> list[SlotDefinitionName]: """ All slotes that have no children :param imports: @@ -1116,7 +1116,7 @@ def expand_curie(self, uri: str) -> str: return uri @lru_cache(CACHE_SIZE) - def get_elements_applicable_by_identifier(self, identifier: str) -> List[str]: + def get_elements_applicable_by_identifier(self, identifier: str) -> list[str]: """ Get a model element by identifier. The model element corresponding to the given identifier as available via the id_prefixes mapped to that element. @@ -1132,7 +1132,7 @@ def get_elements_applicable_by_identifier(self, identifier: str) -> List[str]: return elements @lru_cache(CACHE_SIZE) - def get_elements_applicable_by_prefix(self, prefix: str) -> List[str]: + def get_elements_applicable_by_prefix(self, prefix: str) -> list[str]: """ Get a model element by prefix. The model element corresponding to the given prefix as available via the id_prefixes mapped to that element. @@ -1150,7 +1150,7 @@ def get_elements_applicable_by_prefix(self, prefix: str) -> List[str]: return applicable_elements @lru_cache(None) - def all_aliases(self) -> List[str]: + def all_aliases(self) -> list[str]: """ Get the aliases @@ -1171,8 +1171,8 @@ def all_aliases(self) -> List[str]: return element_aliases @lru_cache(None) - def get_mappings(self, element_name: ElementName = None, imports=True, expand=False) -> Dict[ - MAPPING_TYPE, List[URIorCURIE]]: + def get_mappings(self, element_name: ElementName = None, imports=True, expand=False) -> dict[ + MAPPING_TYPE, list[URIorCURIE]]: """ Get all mappings for a given element @@ -1233,7 +1233,7 @@ def inverse(self, slot_name: SlotDefinition): inverse = slot_definition.name return inverse - def get_element_by_mapping(self, mapping_id: URIorCURIE) -> List[str]: + def get_element_by_mapping(self, mapping_id: URIorCURIE) -> list[str]: model_elements = [] elements = self.all_elements() for el in elements: @@ -1243,7 +1243,7 @@ def get_element_by_mapping(self, mapping_id: URIorCURIE) -> List[str]: model_elements.append(element.name) return model_elements - def get_mapping_index(self, imports=True, expand=False) -> Dict[URIorCURIE, List[tuple[MAPPING_TYPE, Element]]]: + def get_mapping_index(self, imports=True, expand=False) -> dict[URIorCURIE, list[tuple[MAPPING_TYPE, Element]]]: """ Returns an index of all elements keyed by the mapping value. The index values are tuples of mapping type and element @@ -1279,7 +1279,7 @@ def is_relationship(self, class_name: CLASS_NAME = None, imports=True) -> bool: return False @lru_cache(None) - def annotation_dict(self, element_name: ElementName, imports=True) -> Dict[URIorCURIE, Any]: + def annotation_dict(self, element_name: ElementName, imports=True) -> dict[URIorCURIE, Any]: """ Return a dictionary where keys are annotation tags and values are annotation values for any given element. @@ -1295,7 +1295,7 @@ def annotation_dict(self, element_name: ElementName, imports=True) -> Dict[URIor return {k: v.value for k, v in e.annotations.items()} @lru_cache(None) - def class_slots(self, class_name: CLASS_NAME, imports=True, direct=False, attributes=True) -> List[ + def class_slots(self, class_name: CLASS_NAME, imports=True, direct=False, attributes=True) -> list[ SlotDefinitionName]: """ :param class_name: @@ -1431,7 +1431,7 @@ def _metaslots_for_slot(self): return vars(fake_slot).keys() @lru_cache(None) - def class_induced_slots(self, class_name: CLASS_NAME = None, imports=True) -> List[SlotDefinition]: + def class_induced_slots(self, class_name: CLASS_NAME = None, imports=True) -> list[SlotDefinition]: """ All slots that are asserted or inferred for a class, with their inferred semantics @@ -1560,7 +1560,7 @@ def is_inlined(self, slot: SlotDefinition, imports=True) -> bool: else: return False - def slot_applicable_range_elements(self, slot: SlotDefinition) -> List[ClassDefinitionName]: + def slot_applicable_range_elements(self, slot: SlotDefinition) -> list[ClassDefinitionName]: """ Returns all applicable metamodel elements for a slot range (metamodel class names returned: class_definition, enum_definition, type_definition) @@ -1589,7 +1589,7 @@ def slot_applicable_range_elements(self, slot: SlotDefinition) -> List[ClassDefi raise ValueError(f'Unrecognized range: {r}') return range_types - def slot_range_as_union(self, slot: SlotDefinition) -> List[ElementName]: + def slot_range_as_union(self, slot: SlotDefinition) -> list[ElementName]: """ Returns all applicable ranges for a slot @@ -1608,7 +1608,7 @@ def slot_range_as_union(self, slot: SlotDefinition) -> List[ElementName]: def get_classes_by_slot( self, slot: SlotDefinition, include_induced: bool = False - ) -> List[ClassDefinitionName]: + ) -> list[ClassDefinitionName]: """Get all classes that use a given slot, either as a direct or induced slot. :param slot: slot in consideration @@ -1633,7 +1633,7 @@ def get_classes_by_slot( return list(classes_set) @lru_cache(None) - def get_slots_by_enum(self, enum_name: ENUM_NAME = None) -> List[SlotDefinition]: + def get_slots_by_enum(self, enum_name: ENUM_NAME = None) -> list[SlotDefinition]: """Get all slots that use a given enum: schema defined, attribute, or slot_usage. :param enum_name: enum in consideration @@ -1650,7 +1650,7 @@ def get_slots_by_enum(self, enum_name: ENUM_NAME = None) -> List[SlotDefinition] enum_slots.append(slot_definition) return enum_slots - def get_classes_modifying_slot(self, slot: SlotDefinition) -> List[ClassDefinition]: + def get_classes_modifying_slot(self, slot: SlotDefinition) -> list[ClassDefinition]: """Get all ClassDefinitions that modify a given slot. :param slot_name: slot in consideration @@ -1684,7 +1684,7 @@ def is_slot_percent_encoded(self, slot: SlotDefinitionName) -> bool: return "percent_encoded" in anns @lru_cache(None) - def usage_index(self) -> Dict[ElementName, List[SchemaUsage]]: + def usage_index(self) -> dict[ElementName, list[SchemaUsage]]: """ Fetch an index that shows the ways in which each element is used From 0c50a863855c030c11625614b0b99b393ec4fe7a Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 16:57:30 -0700 Subject: [PATCH 3/9] rm dataclass monkeypatch for kwargs in init --- .../utils/dataclass_extensions_376.py | 30 ------------------- linkml_runtime/utils/yamlutils.py | 8 +---- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 linkml_runtime/utils/dataclass_extensions_376.py diff --git a/linkml_runtime/utils/dataclass_extensions_376.py b/linkml_runtime/utils/dataclass_extensions_376.py deleted file mode 100644 index d90b542f..00000000 --- a/linkml_runtime/utils/dataclass_extensions_376.py +++ /dev/null @@ -1,30 +0,0 @@ -import dataclasses -# -# The dataclass library builds a rigid `__init__` function that doesn't allow any unrecognized named parameters -# -# The purpose of this extension is to enhance the library to allow additional keyword arguments to passed in -# and then on to the __post_init__ function that can deal with them accordingly - -# Beware that there is no promise that signature of the create function will remain consistent -loc_fn = dataclasses._create_fn - - -def dc_create_fn(name, args, body, *_posargs, **_kwargs): - # If overriding the initializer and using a post init - if name == '__init__' and dataclasses._POST_INIT_NAME in body[-1]: - # Then insert the kwargs into the both the call and the post init - pi_parms = body[-1].rsplit(')', 1)[0] - body[-1] = pi_parms + ('' if pi_parms[-1] == '(' else ',') + ' **_kwargs)' - return loc_fn(name, list(args) + ["**_kwargs"], body, *_posargs, **_kwargs) - else: - return loc_fn(name, args, body, *_posargs, **_kwargs) - - -dataclasses._create_fn = dc_create_fn - -# The following line is here solely to be backwards compatible. -dataclasses_init_fn_with_kwargs = dataclasses._init_fn - -# The following line can be used to make certain that the import of the new create function doesn't get -# discarded as being potentially unused -DC_CREATE_FN = True diff --git a/linkml_runtime/utils/yamlutils.py b/linkml_runtime/utils/yamlutils.py index 2a5b2832..f70f9ae1 100644 --- a/linkml_runtime/utils/yamlutils.py +++ b/linkml_runtime/utils/yamlutils.py @@ -1,3 +1,4 @@ +import pdb from copy import copy from json import JSONDecoder from typing import Union, Any, Optional, Callable @@ -35,13 +36,6 @@ class YAMLRoot(JsonObj): """ The root object for all python YAML representations """ - def __init__(self, *args, **kwargs): - """ - Override dataclass initializer - @param args: - @param kwargs: - """ - super().__init__(*args, **kwargs) def __post_init__(self, *args: list[str], **kwargs): if args or kwargs: From 7ea7b73f68935af9bd61c9f89575df8086d0aedc Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 16:59:28 -0700 Subject: [PATCH 4/9] rm from imports in test cases and modules, rm redundant 718a test, xfail 718, --- linkml_runtime/linkml_model/annotations.py | 4 -- linkml_runtime/linkml_model/datasets.py | 4 -- linkml_runtime/linkml_model/extensions.py | 4 -- linkml_runtime/linkml_model/mappings.py | 4 -- linkml_runtime/linkml_model/meta.py | 4 -- linkml_runtime/linkml_model/types.py | 4 -- linkml_runtime/linkml_model/units.py | 4 -- linkml_runtime/linkml_model/validation.py | 4 -- .../processing/validation_datamodel.py | 6 --- tests/test_index/model/container_test.py | 4 -- tests/test_issues/input/issue_355.py | 4 -- tests/test_issues/input/issue_368.py | 4 -- tests/test_issues/input/issue_368_imports.py | 4 -- tests/test_issues/models/linkml_issue_576.py | 4 -- tests/test_issues/models/model_817.py | 4 -- tests/test_issues/test_issue_355.py | 4 -- tests/test_issues/test_issue_718.py | 48 +++++++----------- tests/test_issues/test_issue_718a.py | 50 ------------------- .../models/books_normalized.py | 4 -- .../test_loaders_dumpers/models/enum_model.py | 4 -- .../models/node_object.py | 4 -- .../test_loaders_dumpers/models/personinfo.py | 4 -- .../models/personinfo_test_issue_429.py | 4 -- .../models/phenopackets.py | 4 -- .../models/termci_schema.py | 4 -- tests/test_utils/input/inlined_as_dict.py | 4 -- tests/test_utils/input/inlined_as_list.py | 4 -- tests/test_utils/model/inference_example.py | 4 -- 28 files changed, 19 insertions(+), 185 deletions(-) delete mode 100644 tests/test_issues/test_issue_718a.py diff --git a/linkml_runtime/linkml_model/annotations.py b/linkml_runtime/linkml_model/annotations.py index 3055634e..3dbd9183 100644 --- a/linkml_runtime/linkml_model/annotations.py +++ b/linkml_runtime/linkml_model/annotations.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from .extensions import AnyValue, Extension, ExtensionTag @@ -21,9 +20,6 @@ metamodel_version = "1.7.0" version = "2.0.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') DEFAULT_ = LINKML diff --git a/linkml_runtime/linkml_model/datasets.py b/linkml_runtime/linkml_model/datasets.py index 02c7f3cc..b637e831 100644 --- a/linkml_runtime/linkml_model/datasets.py +++ b/linkml_runtime/linkml_model/datasets.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -22,9 +21,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces BIBO = CurieNamespace('bibo', 'http://purl.org/ontology/bibo/') CSVW = CurieNamespace('csvw', 'http://www.w3.org/ns/csvw#') diff --git a/linkml_runtime/linkml_model/extensions.py b/linkml_runtime/linkml_model/extensions.py index 05e1fbc5..9125d581 100644 --- a/linkml_runtime/linkml_model/extensions.py +++ b/linkml_runtime/linkml_model/extensions.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE @@ -21,9 +20,6 @@ metamodel_version = "1.7.0" version = "2.0.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') DEFAULT_ = LINKML diff --git a/linkml_runtime/linkml_model/mappings.py b/linkml_runtime/linkml_model/mappings.py index e2232494..57035d51 100644 --- a/linkml_runtime/linkml_model/mappings.py +++ b/linkml_runtime/linkml_model/mappings.py @@ -10,16 +10,12 @@ from typing import Optional, Union from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" version = "2.0.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces IAO = CurieNamespace('IAO', 'http://purl.obolibrary.org/obo/IAO_') OIO = CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#') diff --git a/linkml_runtime/linkml_model/meta.py b/linkml_runtime/linkml_model/meta.py index 4bbfa3dd..b99b0f7e 100644 --- a/linkml_runtime/linkml_model/meta.py +++ b/linkml_runtime/linkml_model/meta.py @@ -38,7 +38,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.formatutils import sfx from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef @@ -51,9 +50,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces IAO = CurieNamespace('IAO', 'http://purl.obolibrary.org/obo/IAO_') NCIT = CurieNamespace('NCIT', 'http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#') diff --git a/linkml_runtime/linkml_model/types.py b/linkml_runtime/linkml_model/types.py index ba0a7bc2..f60eac8a 100644 --- a/linkml_runtime/linkml_model/types.py +++ b/linkml_runtime/linkml_model/types.py @@ -8,16 +8,12 @@ import dataclasses -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import Bool, Curie, Decimal, ElementIdentifier, NCName, NodeIdentifier, URI, URIorCURIE, XSDDate, XSDDateTime, XSDTime metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') SCHEMA = CurieNamespace('schema', 'http://schema.org/') diff --git a/linkml_runtime/linkml_model/units.py b/linkml_runtime/linkml_model/units.py index c31b1d95..e14943aa 100644 --- a/linkml_runtime/linkml_model/units.py +++ b/linkml_runtime/linkml_model/units.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE @@ -21,9 +20,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces IAO = CurieNamespace('IAO', 'http://purl.obolibrary.org/obo/IAO_') OIO = CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#') diff --git a/linkml_runtime/linkml_model/validation.py b/linkml_runtime/linkml_model/validation.py index ee4615c1..e506a401 100644 --- a/linkml_runtime/linkml_model/validation.py +++ b/linkml_runtime/linkml_model/validation.py @@ -14,7 +14,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -23,9 +22,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') OWL = CurieNamespace('owl', 'http://www.w3.org/2002/07/owl#') diff --git a/linkml_runtime/processing/validation_datamodel.py b/linkml_runtime/processing/validation_datamodel.py index a65b7f29..b4fb76b6 100644 --- a/linkml_runtime/processing/validation_datamodel.py +++ b/linkml_runtime/processing/validation_datamodel.py @@ -20,9 +20,6 @@ from linkml_runtime.utils.yamlutils import ( YAMLRoot, ) -from linkml_runtime.utils.dataclass_extensions_376 import ( - dataclasses_init_fn_with_kwargs, -) from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -31,9 +28,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace("linkml", "https://w3id.org/linkml/") OWL = CurieNamespace("owl", "http://www.w3.org/2002/07/owl#") diff --git a/tests/test_index/model/container_test.py b/tests/test_index/model/container_test.py index 1dc73f10..84c2603c 100644 --- a/tests/test_index/model/container_test.py +++ b/tests/test_index/model/container_test.py @@ -16,7 +16,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -25,9 +24,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces CODE = CurieNamespace('CODE', 'http://example.org/code/') GEO = CurieNamespace('GEO', 'http://example.org/geoloc/') diff --git a/tests/test_issues/input/issue_355.py b/tests/test_issues/input/issue_355.py index ecf17ce3..991d356c 100644 --- a/tests/test_issues/input/issue_355.py +++ b/tests/test_issues/input/issue_355.py @@ -13,16 +13,12 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') SCT = CurieNamespace('sct', 'http://snomed.info/id/') diff --git a/tests/test_issues/input/issue_368.py b/tests/test_issues/input/issue_368.py index 0f02158d..39b6d31b 100644 --- a/tests/test_issues/input/issue_368.py +++ b/tests/test_issues/input/issue_368.py @@ -11,16 +11,12 @@ from dataclasses import dataclass from linkml_runtime.utils.slot import Slot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from .issue_368_imports import ParentClass, SampleEnum metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') DEFAULT_ = CurieNamespace('', 'https://microbiomedata/schema/') diff --git a/tests/test_issues/input/issue_368_imports.py b/tests/test_issues/input/issue_368_imports.py index e15bdb15..823524c0 100644 --- a/tests/test_issues/input/issue_368_imports.py +++ b/tests/test_issues/input/issue_368_imports.py @@ -11,7 +11,6 @@ from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -19,9 +18,6 @@ metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces DEFAULT_ = CurieNamespace('', 'https://microbiomedata/schema/mixs/') diff --git a/tests/test_issues/models/linkml_issue_576.py b/tests/test_issues/models/linkml_issue_576.py index 89a1f39d..0b7bf1f9 100644 --- a/tests/test_issues/models/linkml_issue_576.py +++ b/tests/test_issues/models/linkml_issue_576.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.linkml_model.types import String @@ -22,9 +21,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EX = CurieNamespace('ex', 'https://example.org/') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') diff --git a/tests/test_issues/models/model_817.py b/tests/test_issues/models/model_817.py index f9ca3298..874a9162 100644 --- a/tests/test_issues/models/model_817.py +++ b/tests/test_issues/models/model_817.py @@ -15,7 +15,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -23,9 +22,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') PERSONINFO = CurieNamespace('personinfo', 'https://w3id.org/linkml/examples/personinfo/') diff --git a/tests/test_issues/test_issue_355.py b/tests/test_issues/test_issue_355.py index a2032ff7..4e44ad74 100644 --- a/tests/test_issues/test_issue_355.py +++ b/tests/test_issues/test_issue_355.py @@ -14,16 +14,12 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URIorCURIE metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') SCT = CurieNamespace('sct', 'http://snomed.info/id/') diff --git a/tests/test_issues/test_issue_718.py b/tests/test_issues/test_issue_718.py index 63d0b879..5ad6e331 100644 --- a/tests/test_issues/test_issue_718.py +++ b/tests/test_issues/test_issue_718.py @@ -1,18 +1,14 @@ -import dataclasses -import unittest +import pytest from dataclasses import dataclass from typing import Optional, ClassVar import yaml -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.yamlutils import YAMLRoot, DupCheckYamlLoader -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - -class Issue83TestCase(unittest.TestCase): +@pytest.mark.xfail(reason='Reporting line numbers should happen at load time not when instantiating dataclasses') +def test_issue_38(): # The goal is to provide line numbers on error messages. We've tweaked the parser so that it returns augmented # str's and int's with the line numbers on them. The problem we are trying to address now is that the dataclass # constructor doesn't support **argv out of the box. We can certainly tweak the generator to emit the __init__ @@ -25,27 +21,21 @@ class FesterBesterTester(YAMLRoot): a: Optional[int] = 0 b: Optional[str] = None - def test_initvar(self): - with self.assertRaises(ValueError) as e: - Issue83TestCase.FesterBesterTester(a=12, b="Sell", c="buy") - self.assertEqual("Unknown argument: c = 'buy'", str(e.exception).strip()) - yaml_str = """base: + with pytest.raises(TypeError, match="unexpected keyword argument 'c'"): + FesterBesterTester(a=12, b="Sell", c="buy") + + yaml_str = """base: a: 17 b: Ice Cream - c: sell -""" - parsed_yaml = yaml.load(yaml_str, DupCheckYamlLoader) - with self.assertRaises(ValueError) as e: - Issue83TestCase.FesterBesterTester(**parsed_yaml['base']) - self.assertEqual('File "", line 4, col 9: Unknown argument: c = \'sell\'', - str(e.exception).strip()) - - parsed_yaml['base'].pop('c', None) - try: - Issue83TestCase.FesterBesterTester(**parsed_yaml['base']) - except Exception as e: - self.fail(f'Raised exception unexpectedly: {str(e.exception)}') - - -if __name__ == '__main__': - unittest.main() + c: sell""" + + parsed_yaml = yaml.load(yaml_str, DupCheckYamlLoader) + with pytest.raises(TypeError, match="File \"\", line 4, col 9"): + FesterBesterTester(**parsed_yaml['base']) + + parsed_yaml['base'].pop('c', None) + + instance = FesterBesterTester(**parsed_yaml['base']) + assert instance.a == 17 + assert instance.b == "Ice Cream" + diff --git a/tests/test_issues/test_issue_718a.py b/tests/test_issues/test_issue_718a.py deleted file mode 100644 index ad6e9dc0..00000000 --- a/tests/test_issues/test_issue_718a.py +++ /dev/null @@ -1,50 +0,0 @@ -import unittest -from dataclasses import dataclass -from typing import Optional, ClassVar - -import yaml - -import linkml_runtime.utils.dataclass_extensions_376 as dc_tweak -# This line makes certain that the import remains -DC_IN = dc_tweak.DC_CREATE_FN - -from linkml_runtime.utils.yamlutils import YAMLRoot, DupCheckYamlLoader - - -class Issue83TestCase(unittest.TestCase): - # The goal is to provide line numbers on error messages. We've tweaked the parser so that it returns augmented - # str's and int's with the line numbers on them. The problem we are trying to address now is that the dataclass - # constructor doesn't support **argv out of the box. We can certainly tweak the generator to emit the __init__ - # method to do this, but it would be really handy - - @dataclass - class FesterBesterTester(YAMLRoot): - cv: ClassVar[int] = 42 - - a: Optional[int] = 0 - b: Optional[str] = None - - def test_initvar(self): - with self.assertRaises(ValueError) as e: - Issue83TestCase.FesterBesterTester(a=12, b="Sell", c="buy") - self.assertEqual("Unknown argument: c = 'buy'", str(e.exception).strip()) - yaml_str = """base: - a: 17 - b: Ice Cream - c: sell -""" - parsed_yaml = yaml.load(yaml_str, DupCheckYamlLoader) - with self.assertRaises(ValueError) as e: - Issue83TestCase.FesterBesterTester(**parsed_yaml['base']) - self.assertEqual('File "", line 4, col 9: Unknown argument: c = \'sell\'', - str(e.exception).strip()) - - parsed_yaml['base'].pop('c', None) - try: - Issue83TestCase.FesterBesterTester(**parsed_yaml['base']) - except Exception as e: - self.fail(f'Raised exception unexpectedly: {str(e.exception)}') - - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_loaders_dumpers/models/books_normalized.py b/tests/test_loaders_dumpers/models/books_normalized.py index 35edd068..5ef2eb8d 100644 --- a/tests/test_loaders_dumpers/models/books_normalized.py +++ b/tests/test_loaders_dumpers/models/books_normalized.py @@ -15,16 +15,12 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EXAMPLE = CurieNamespace('example', 'https://w3id.org/example') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') diff --git a/tests/test_loaders_dumpers/models/enum_model.py b/tests/test_loaders_dumpers/models/enum_model.py index 4c64c484..29268796 100644 --- a/tests/test_loaders_dumpers/models/enum_model.py +++ b/tests/test_loaders_dumpers/models/enum_model.py @@ -13,7 +13,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -21,9 +20,6 @@ metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces DEFAULT_ = CurieNamespace('', 'https://example.org/enum_test/') diff --git a/tests/test_loaders_dumpers/models/node_object.py b/tests/test_loaders_dumpers/models/node_object.py index 4cbf888d..8fbfe102 100644 --- a/tests/test_loaders_dumpers/models/node_object.py +++ b/tests/test_loaders_dumpers/models/node_object.py @@ -14,15 +14,11 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EX = CurieNamespace('ex', 'https://w3id.org/example/') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') diff --git a/tests/test_loaders_dumpers/models/personinfo.py b/tests/test_loaders_dumpers/models/personinfo.py index 643ccb8b..8b28bc49 100644 --- a/tests/test_loaders_dumpers/models/personinfo.py +++ b/tests/test_loaders_dumpers/models/personinfo.py @@ -16,7 +16,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -26,9 +25,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces GSSO = CurieNamespace('GSSO', 'http://purl.obolibrary.org/obo/GSSO_') HP = CurieNamespace('HP', 'http://purl.obolibrary.org/obo/HP_') diff --git a/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py b/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py index 68aaf70c..4ec14d1c 100644 --- a/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py +++ b/tests/test_loaders_dumpers/models/personinfo_test_issue_429.py @@ -13,16 +13,12 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces ORCID = CurieNamespace('ORCID', 'https://orcid.org/') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') diff --git a/tests/test_loaders_dumpers/models/phenopackets.py b/tests/test_loaders_dumpers/models/phenopackets.py index 0b2446ca..5ad33459 100644 --- a/tests/test_loaders_dumpers/models/phenopackets.py +++ b/tests/test_loaders_dumpers/models/phenopackets.py @@ -15,7 +15,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -24,9 +23,6 @@ metamodel_version = "1.7.0" version = None -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces ARGO = CurieNamespace('ARGO', 'https://docs.icgc-argo.org/dictionary/') GENO = CurieNamespace('GENO', 'http://purl.obolibrary.org/obo/GENO_') diff --git a/tests/test_loaders_dumpers/models/termci_schema.py b/tests/test_loaders_dumpers/models/termci_schema.py index 1f5a0e45..ed47afd5 100644 --- a/tests/test_loaders_dumpers/models/termci_schema.py +++ b/tests/test_loaders_dumpers/models/termci_schema.py @@ -12,16 +12,12 @@ from linkml_runtime.utils.metamodelcore import empty_list, empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace from linkml_runtime.utils.metamodelcore import URI, URIorCURIE metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces DC = CurieNamespace('dc', 'http://purl.org/dc/elements/1.1/') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') diff --git a/tests/test_utils/input/inlined_as_dict.py b/tests/test_utils/input/inlined_as_dict.py index 7f43820e..e4ecabe6 100644 --- a/tests/test_utils/input/inlined_as_dict.py +++ b/tests/test_utils/input/inlined_as_dict.py @@ -12,16 +12,12 @@ from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EX = CurieNamespace('ex', 'https://example.org/inlined_as_dict#') XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#') diff --git a/tests/test_utils/input/inlined_as_list.py b/tests/test_utils/input/inlined_as_list.py index 1c91129b..c50d2fe0 100644 --- a/tests/test_utils/input/inlined_as_list.py +++ b/tests/test_utils/input/inlined_as_list.py @@ -12,16 +12,12 @@ from linkml_runtime.utils.metamodelcore import empty_dict from linkml_runtime.utils.yamlutils import YAMLRoot, extended_str -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EX = CurieNamespace('ex', 'https://example.org/inlined_as_dict#') XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#') diff --git a/tests/test_utils/model/inference_example.py b/tests/test_utils/model/inference_example.py index 7be9c8a8..76888dd9 100644 --- a/tests/test_utils/model/inference_example.py +++ b/tests/test_utils/model/inference_example.py @@ -15,7 +15,6 @@ from linkml_runtime.utils.slot import Slot from linkml_runtime.utils.metamodelcore import empty_list from linkml_runtime.utils.yamlutils import YAMLRoot -from linkml_runtime.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import URIRef from linkml_runtime.utils.curienamespace import CurieNamespace @@ -24,9 +23,6 @@ metamodel_version = "1.7.0" -# Overwrite dataclasses _init_fn to add **kwargs in __init__ -dataclasses._init_fn = dataclasses_init_fn_with_kwargs - # Namespaces EX = CurieNamespace('ex', 'https://w3id.org/linkml/examples/inference/') LINKML = CurieNamespace('linkml', 'https://w3id.org/linkml/') From 81fd0cc765d4ca125a6ad61298fd3c0fe1fc0cfe Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 16:59:52 -0700 Subject: [PATCH 5/9] rm deprecated pydantic calls for what feels like the one thousandth time --- linkml_runtime/dumpers/json_dumper.py | 6 +++--- linkml_runtime/dumpers/rdf_dumper.py | 4 ++-- linkml_runtime/loaders/loader_root.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linkml_runtime/dumpers/json_dumper.py b/linkml_runtime/dumpers/json_dumper.py index 6b34305f..9d44c730 100644 --- a/linkml_runtime/dumpers/json_dumper.py +++ b/linkml_runtime/dumpers/json_dumper.py @@ -30,7 +30,7 @@ def dump(self, element: Union[BaseModel, YAMLRoot], to_file: str, contexts: CONT * A list containing elements of any type named above """ if isinstance(element, BaseModel): - element = element.dict() + element = element.model_dump() super().dump(element, to_file, contexts=contexts, **kwargs) def dumps(self, element: Union[BaseModel, YAMLRoot], contexts: CONTEXTS_PARAM_TYPE = None, inject_type=True) -> str: @@ -50,7 +50,7 @@ def dumps(self, element: Union[BaseModel, YAMLRoot], contexts: CONTEXTS_PARAM_TY def default(o): if isinstance(o, BaseModel): - return remove_empty_items(o.dict(), hide_protected_keys=True) + return remove_empty_items(o.model_dump(), hide_protected_keys=True) if isinstance(o, YAMLRoot): return remove_empty_items(o, hide_protected_keys=True) elif isinstance(o, Decimal): @@ -59,7 +59,7 @@ def default(o): else: return json.JSONDecoder().decode(o) if isinstance(element, BaseModel): - element = element.dict() + element = element.model_dump() return json.dumps(as_json_object(element, contexts, inject_type=inject_type), default=default, ensure_ascii=False, diff --git a/linkml_runtime/dumpers/rdf_dumper.py b/linkml_runtime/dumpers/rdf_dumper.py index 6de4251b..d49cd496 100644 --- a/linkml_runtime/dumpers/rdf_dumper.py +++ b/linkml_runtime/dumpers/rdf_dumper.py @@ -79,7 +79,7 @@ def dump(self, element: Union[BaseModel, YAMLRoot], to_file: str, contexts: CONT :param fmt: RDF format """ if isinstance(element, BaseModel): - element = element.dict() + element = element.model_dump() super().dump(element, to_file, contexts=contexts, fmt=fmt) def dumps(self, element: Union[BaseModel, YAMLRoot], contexts: CONTEXTS_PARAM_TYPE = None, fmt: Optional[str] = 'turtle') -> str: @@ -91,6 +91,6 @@ def dumps(self, element: Union[BaseModel, YAMLRoot], contexts: CONTEXTS_PARAM_TY :return: rdflib Graph containing element """ if isinstance(element, BaseModel): - element = element.dict() + element = element.model_dump() return self.as_rdf_graph(remove_empty_items(element, hide_protected_keys=True), contexts).\ serialize(format=fmt) diff --git a/linkml_runtime/loaders/loader_root.py b/linkml_runtime/loaders/loader_root.py index 49e3fae2..137d9913 100644 --- a/linkml_runtime/loaders/loader_root.py +++ b/linkml_runtime/loaders/loader_root.py @@ -127,12 +127,12 @@ def _construct_target_class(self, if issubclass(target_class, YAMLRoot): return [target_class(**as_dict(x)) for x in data_as_dict] elif issubclass(target_class, BaseModel): - return [target_class.parse_obj(as_dict(x)) for x in data_as_dict] + return [target_class.model_validate(as_dict(x)) for x in data_as_dict] else: raise ValueError(f'Cannot load list of {target_class}') elif isinstance(data_as_dict, dict): if issubclass(target_class, BaseModel): - return target_class.parse_obj(data_as_dict) + return target_class.model_validate(data_as_dict) else: return target_class(**data_as_dict) elif isinstance(data_as_dict, JsonObj): From cc8079cd3a158f2bfa607b47a86f8345b690eb62 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 17:00:25 -0700 Subject: [PATCH 6/9] rm block marked as to be deprecated with python 3.7 but without deprecation warning we actually have no way of keeping track of that. --- linkml_runtime/utils/eval_utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/linkml_runtime/utils/eval_utils.py b/linkml_runtime/utils/eval_utils.py index a7d28bfb..31a7bdaf 100644 --- a/linkml_runtime/utils/eval_utils.py +++ b/linkml_runtime/utils/eval_utils.py @@ -106,9 +106,6 @@ def eval_(node, bindings={}): return node.value elif isinstance(node, ast.Constant): return node.value - elif isinstance(node, ast.NameConstant): - # can be removed when python 3.7 is no longer supported - return node.value elif isinstance(node, ast.Name): return bindings.get(node.id) elif isinstance(node, ast.Subscript): From 311ae03de27d05278ceb5152fdc654dcc2a5685e Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 17:00:42 -0700 Subject: [PATCH 7/9] don't discover TestEnvironment as being itself a test --- tests/support/test_environment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/support/test_environment.py b/tests/support/test_environment.py index 8bebdbac..35efa086 100644 --- a/tests/support/test_environment.py +++ b/tests/support/test_environment.py @@ -35,6 +35,8 @@ class MismatchAction(Enum): class TestEnvironment: import_map_warning_emitted: bool = False + __test__ = False + """ Testing environment """ def __init__(self, filedir: str) -> None: self.cwd = os.path.dirname(filedir) # base directory for indir, outdir and tempdir From c6c04bee2a32d7f2b7d58af28066975f37ce904e Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 14 Oct 2024 17:34:44 -0700 Subject: [PATCH 8/9] python 3.9 compat --- .../models/books_normalized_pydantic.py | 61 +++--- .../models/kitchen_sink_pydantic.py | 192 +++++++++--------- tox.ini | 11 +- 3 files changed, 132 insertions(+), 132 deletions(-) diff --git a/tests/test_loaders_dumpers/models/books_normalized_pydantic.py b/tests/test_loaders_dumpers/models/books_normalized_pydantic.py index ec421751..2200fb7a 100644 --- a/tests/test_loaders_dumpers/models/books_normalized_pydantic.py +++ b/tests/test_loaders_dumpers/models/books_normalized_pydantic.py @@ -1,5 +1,6 @@ from __future__ import annotations from enum import Enum +from typing import Optional from pydantic import BaseModel as BaseModel, Field metamodel_version = "None" @@ -31,66 +32,66 @@ class GenreEnum(str, Enum): class CreativeWork(ConfiguredBaseModel): - id: str | None = Field(None) - name: str | None = Field(None) - genres: list[GenreEnum] | None = Field(default_factory=list) - creator: Author | None = Field(None) - summary: str | None = Field(None) - reviews: list[Review] | None = Field(default_factory=list) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + genres: Optional[list[GenreEnum]] = Field(default_factory=list) + creator: Optional[Author] = Field(None) + summary: Optional[str] = Field(None) + reviews: Optional[list[Review]] = Field(default_factory=list) class Book(CreativeWork): - price: float | None = Field(None) - inStock: str | None = Field(None) - id: str | None = Field(None) - name: str | None = Field(None) - genres: list[GenreEnum] | None = Field(default_factory=list) - creator: Author | None = Field(None) - summary: str | None = Field(None) - reviews: list[Review] | None = Field(default_factory=list) + price: Optional[float] = Field(None) + inStock: Optional[str] = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + genres: Optional[list[GenreEnum]] = Field(default_factory=list) + creator: Optional[Author] = Field(None) + summary: Optional[str] = Field(None) + reviews: Optional[list[Review]] = Field(default_factory=list) class BookSeries(CreativeWork): - books: list[Book] | None = Field(default_factory=list) - genres: list[GenreEnum] | None = Field(default_factory=list) - price: float | None = Field(None) - id: str | None = Field(None) - name: str | None = Field(None) - creator: Author | None = Field(None) - summary: str | None = Field(None) - reviews: list[Review] | None = Field(default_factory=list) + books: Optional[list[Book]] = Field(default_factory=list) + genres: Optional[list[GenreEnum]] = Field(default_factory=list) + price: Optional[float] = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + creator: Optional[Author] = Field(None) + summary: Optional[str] = Field(None) + reviews: Optional[list[Review]] = Field(default_factory=list) class Author(ConfiguredBaseModel): - name: str | None = Field(None) - genres: list[GenreEnum] | None = Field(default_factory=list) - from_country: str | None = Field(None) + name: Optional[str] = Field(None) + genres: Optional[list[GenreEnum]] = Field(default_factory=list) + from_country: Optional[str] = Field(None) class Shop(ConfiguredBaseModel): - all_book_series: list[BookSeries] | None = Field(default_factory=list) + all_book_series: Optional[list[BookSeries]] = Field(default_factory=list) class Country(ConfiguredBaseModel): - name: str | None = Field(None) + name: Optional[str] = Field(None) class Review(ConfiguredBaseModel): - creator: Author | None = Field(None) - rating: int | None = Field(None) - review_text: str | None = Field(None) + creator: Optional[Author] = Field(None) + rating: Optional[int] = Field(None) + review_text: Optional[str] = Field(None) diff --git a/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py b/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py index 96a6570c..bc99155d 100644 --- a/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py +++ b/tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import date from enum import Enum -from typing import Any +from typing import Any, Optional from pydantic import BaseModel as BaseModel, Field metamodel_version = "None" @@ -60,13 +60,13 @@ class LifeStatusEnum(str, Enum): class HasAliases(ConfiguredBaseModel): - aliases: list[str] | None = Field(default_factory=list) + aliases: Optional[list[str]] = Field(default_factory=list) class Friend(ConfiguredBaseModel): - name: str | None = Field(None) + name: Optional[str] = Field(None) @@ -74,18 +74,18 @@ class Person(HasAliases): """ A person, living or dead """ - id: str | None = Field(None) - name: str | None = Field(None) - has_employment_history: list[EmploymentEvent] | None = Field(None) - has_familial_relationships: list[FamilialRelationship] | None = Field(None) - has_medical_history: list[MedicalEvent] | None = Field(None) - age_in_years: int | None = Field(None, description="""number of years since birth""", ge=0, le=999) - addresses: list[Address] | None = Field(default_factory=list) - has_birth_event: BirthEvent | None = Field(None) - species_name: str | None = Field(None) - stomach_count: int | None = Field(None) - is_living: LifeStatusEnum | None = Field(None) - aliases: list[str] | None = Field(default_factory=list) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + has_employment_history: Optional[list[EmploymentEvent]] = Field(None) + has_familial_relationships: Optional[list[FamilialRelationship]] = Field(None) + has_medical_history: Optional[list[MedicalEvent]] = Field(None) + age_in_years: Optional[int] = Field(None, description="""number of years since birth""", ge=0, le=999) + addresses: Optional[list[Address]] = Field(default_factory=list) + has_birth_event: Optional[BirthEvent] = Field(None) + species_name: Optional[str] = Field(None) + stomach_count: Optional[int] = Field(None) + is_living: Optional[LifeStatusEnum] = Field(None) + aliases: Optional[list[str]] = Field(default_factory=list) @@ -102,73 +102,73 @@ class Organization(HasAliases): * a * list """ - id: str | None = Field(None) - name: str | None = Field(None) - aliases: list[str] | None = Field(default_factory=list) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + aliases: Optional[list[str]] = Field(default_factory=list) class Place(HasAliases): - id: str | None = Field(None) - name: str | None = Field(None) - aliases: list[str] | None = Field(default_factory=list) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + aliases: Optional[list[str]] = Field(default_factory=list) class Address(ConfiguredBaseModel): - street: str | None = Field(None) - city: str | None = Field(None) + street: Optional[str] = Field(None) + city: Optional[str] = Field(None) class Concept(ConfiguredBaseModel): - id: str | None = Field(None) - name: str | None = Field(None) - in_code_system: str | None = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + in_code_system: Optional[str] = Field(None) class DiagnosisConcept(Concept): - id: str | None = Field(None) - name: str | None = Field(None) - in_code_system: str | None = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + in_code_system: Optional[str] = Field(None) class ProcedureConcept(Concept): - id: str | None = Field(None) - name: str | None = Field(None) - in_code_system: str | None = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + in_code_system: Optional[str] = Field(None) class Event(ConfiguredBaseModel): - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - is_current: bool | None = Field(None) - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + is_current: Optional[bool] = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") class Relationship(ConfiguredBaseModel): - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - related_to: str | None = Field(None) - type: str | None = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + related_to: Optional[str] = Field(None) + type: Optional[str] = Field(None) class FamilialRelationship(Relationship): - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) related_to: str = Field(...) type: FamilialRelationshipType = Field(...) @@ -176,103 +176,103 @@ class FamilialRelationship(Relationship): class BirthEvent(Event): - in_location: str | None = Field(None) - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - is_current: bool | None = Field(None) - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + in_location: Optional[str] = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + is_current: Optional[bool] = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") class EmploymentEvent(Event): - employed_at: str | None = Field(None) - type: EmploymentEventType | None = Field(None) - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - is_current: bool | None = Field(None) - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + employed_at: Optional[str] = Field(None) + type: Optional[EmploymentEventType] = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + is_current: Optional[bool] = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") class MedicalEvent(Event): - in_location: str | None = Field(None) - diagnosis: DiagnosisConcept | None = Field(None) - procedure: ProcedureConcept | None = Field(None) - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - is_current: bool | None = Field(None) - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + in_location: Optional[str] = Field(None) + diagnosis: Optional[DiagnosisConcept] = Field(None) + procedure: Optional[ProcedureConcept] = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + is_current: Optional[bool] = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") class WithLocation(ConfiguredBaseModel): - in_location: str | None = Field(None) + in_location: Optional[str] = Field(None) class MarriageEvent(WithLocation, Event): - married_to: str | None = Field(None) - in_location: str | None = Field(None) - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - is_current: bool | None = Field(None) - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") + married_to: Optional[str] = Field(None) + in_location: Optional[str] = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + is_current: Optional[bool] = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") class Company(Organization): - ceo: str | None = Field(None) - id: str | None = Field(None) - name: str | None = Field(None) - aliases: list[str] | None = Field(default_factory=list) + ceo: Optional[str] = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) + aliases: Optional[list[str]] = Field(default_factory=list) class CodeSystem(ConfiguredBaseModel): - id: str | None = Field(None) - name: str | None = Field(None) + id: Optional[str] = Field(None) + name: Optional[str] = Field(None) class Dataset(ConfiguredBaseModel): - metadata: Any | None = Field(None, description="""Example of a slot that has an unconstrained range""") - persons: list[Person] | None = Field(default_factory=list) - companies: list[Company] | None = Field(default_factory=list) - activities: list[Activity] | None = Field(default_factory=list) - code_systems: dict[str, CodeSystem] | None = Field(None) + metadata: Optional[Any] = Field(None, description="""Example of a slot that has an unconstrained range""") + persons: Optional[list[Person]] = Field(default_factory=list) + companies: Optional[list[Company]] = Field(default_factory=list) + activities: Optional[list[Activity]] = Field(default_factory=list) + code_systems: Optional[dict[str, CodeSystem]] = Field(None) class FakeClass(ConfiguredBaseModel): - test_attribute: str | None = Field(None) + test_attribute: Optional[str] = Field(None) class ClassWithSpaces(ConfiguredBaseModel): - slot_with_space_1: str | None = Field(None) + slot_with_space_1: Optional[str] = Field(None) class SubclassTest(ClassWithSpaces): - slot_with_space_2: ClassWithSpaces | None = Field(None) - slot_with_space_1: str | None = Field(None) + slot_with_space_2: Optional[ClassWithSpaces] = Field(None) + slot_with_space_1: Optional[str] = Field(None) class SubSubClass2(SubclassTest): - slot_with_space_2: ClassWithSpaces | None = Field(None) - slot_with_space_1: str | None = Field(None) + slot_with_space_2: Optional[ClassWithSpaces] = Field(None) + slot_with_space_1: Optional[str] = Field(None) @@ -280,8 +280,8 @@ class TubSubClass1(SubclassTest): """ Same depth as Sub sub class 1 """ - slot_with_space_2: ClassWithSpaces | None = Field(None) - slot_with_space_1: str | None = Field(None) + slot_with_space_2: Optional[ClassWithSpaces] = Field(None) + slot_with_space_1: Optional[str] = Field(None) @@ -289,13 +289,13 @@ class Activity(ConfiguredBaseModel): """ a provence-generating activity """ - id: str | None = Field(None) - started_at_time: date | None = Field(None) - ended_at_time: date | None = Field(None) - was_informed_by: str | None = Field(None) - was_associated_with: str | None = Field(None) - used: str | None = Field(None) - description: str | None = Field(None) + id: Optional[str] = Field(None) + started_at_time: Optional[date] = Field(None) + ended_at_time: Optional[date] = Field(None) + was_informed_by: Optional[str] = Field(None) + was_associated_with: Optional[str] = Field(None) + used: Optional[str] = Field(None) + description: Optional[str] = Field(None) @@ -303,9 +303,9 @@ class Agent(ConfiguredBaseModel): """ a provence-generating agent """ - id: str | None = Field(None) - acted_on_behalf_of: str | None = Field(None) - was_informed_by: str | None = Field(None) + id: Optional[str] = Field(None) + acted_on_behalf_of: Optional[str] = Field(None) + was_informed_by: Optional[str] = Field(None) diff --git a/tox.ini b/tox.ini index d33deaa0..418842ed 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,11 @@ [tox] envlist = py37, py38, py39, py310 isolated_build = true -skipsdist = true - [testenv] -whitelist_externals = poetry +deps= + pytest + requests-cache + coverage commands= - poetry install -v - poetry run python -m unittest - poetry run comparefiles --help + python -m pytest From 4d238575d9a68085a00361936f304ff7a225f0c2 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 28 Oct 2024 12:59:13 -0700 Subject: [PATCH 9/9] rm pdb --- linkml_runtime/utils/yamlutils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/linkml_runtime/utils/yamlutils.py b/linkml_runtime/utils/yamlutils.py index f70f9ae1..251a0061 100644 --- a/linkml_runtime/utils/yamlutils.py +++ b/linkml_runtime/utils/yamlutils.py @@ -1,4 +1,3 @@ -import pdb from copy import copy from json import JSONDecoder from typing import Union, Any, Optional, Callable