Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Jan 31, 2025
1 parent d90a260 commit b8e217e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/ga4gh/va_spec/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from abc import ABC
from datetime import date
from enum import Enum
from typing import Annotated, Any, Literal, TypeVar
from typing import Annotated, Any, Literal

from ga4gh.cat_vrs.models import CategoricalVariant
from ga4gh.core.models import Entity, MappableConcept, iriReference
Expand Down Expand Up @@ -409,6 +409,7 @@ class DataSet(Entity):
description="A specific license that dictates legal permissions for how a data set can be used (by whom, where, for what purposes, with what additional requirements, etc.)",
)


class EvidenceLine(InformationEntity):
"""An independent, evidence-based argument that may support or refute the validity
of a specific Proposition. The strength and direction of this argument is based on
Expand All @@ -426,9 +427,7 @@ class EvidenceLine(InformationEntity):
None,
description="The possible fact against which evidence items contained in an Evidence Line were collectively evaluated, in determining the overall strength and direction of support they provide. For example, in an ACMG Guideline-based assessment of variant pathogenicity, the support provided by distinct lines of evidence are assessed against a target proposition that the variant is pathogenic for a specific disease.",
)
hasEvidenceItems: (
list[Statement | EvidenceLine | iriReference] | None
) = Field(
hasEvidenceItems: list[Statement | EvidenceLine | iriReference] | None = Field(
None,
description="An individual piece of information that was evaluated as evidence in building the argument represented by an Evidence Line.",
)
Expand All @@ -449,9 +448,10 @@ class EvidenceLine(InformationEntity):
description="A term summarizing the overall outcome of the evidence assessment represented by the Evidence Line, in terms of the direction and strength of support it provides for or against the target Proposition.",
)


@field_serializer("hasEvidenceItems")
def serialize_value(self, value: list[Statement | EvidenceLine | iriReference] | None) -> dict | str:
def serialize_value(
self, value: list[Statement | EvidenceLine | iriReference] | None
) -> dict | str:
"""Create custom serializer for ``hasEvidenceItems``
This is to resolve Pydantic serialization warnings
Expand All @@ -467,6 +467,7 @@ def serialize_value(self, value: list[Statement | EvidenceLine | iriReference] |

return value


class Statement(InformationEntity):
"""A claim of purported truth as made by a particular agent, on a particular
occasion. Statements may be used to put forth a possible fact (i.e. a 'Proposition')
Expand Down

0 comments on commit b8e217e

Please sign in to comment.