diff --git a/.ruff.toml b/.ruff.toml index 8bb1f0a6..ff568d81 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -24,9 +24,9 @@ ignore = [ "D202", # blank lines allowed after function docstring "D209", # multi-line docstring closing quote on newline "RUF009", # do not perform function call in dataclass defaults - "PLR0913", # too many arguments "D100", # missing docstring in public module "N805", # first argument of a method should be named `self` + "UP007", # new syntax for union type annotations based on the `|` operator ] line-length = 88 diff --git a/pyproject.toml b/pyproject.toml index 456b0423..808e0237 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,6 @@ classifiers = [ "Development Status :: 1 - Planning", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development :: Libraries", diff --git a/src/metldata/builtin_transformations/custom_embeddings/embedding_profile.py b/src/metldata/builtin_transformations/custom_embeddings/embedding_profile.py index 3604d7cf..1a379789 100644 --- a/src/metldata/builtin_transformations/custom_embeddings/embedding_profile.py +++ b/src/metldata/builtin_transformations/custom_embeddings/embedding_profile.py @@ -18,6 +18,8 @@ from __future__ import annotations +from typing import Optional, Union + from pydantic import BaseModel, Field @@ -36,10 +38,10 @@ class EmbeddingProfile(BaseModel): source_class: str = Field( ..., description="The class to which the this embedding profile applies." ) - description: str | None = Field( + description: Optional[str] = Field( ..., description="Description of the transformed class with embeddings." ) - embedded_references: dict[str, str | EmbeddingProfile] = Field( + embedded_references: dict[str, Union[str, EmbeddingProfile]] = Field( ..., description=( "The references embedded into the target class."