Skip to content

Commit

Permalink
tryfix: disable logging in dataclasses_json code
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ke committed Sep 12, 2024
1 parent 79e7e30 commit c55f2cb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/compose_client/library/models/definition/datapoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# [2019] - [2024] © NeuroForge GmbH & Co. KG

from dataclasses import dataclass, field
from typing import Any, List, Dict, Union, BinaryIO
from typing import Any, List, Dict, Union, BinaryIO, TYPE_CHECKING

from dataclasses_json import dataclass_json, Undefined

Expand All @@ -25,12 +25,17 @@ def __init__(self, url: str):
# typing below the first level is subpar, but this is the best we can do for now
Primitive = Union[str, float, int, bool, Dict[str, Any], List[Any]]

if TYPE_CHECKING:
PayloadType = Dict[str, Union[Primitive, FileTypeContent, BinaryIO]]
else:
PayloadType = dict


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclass
class DataPoint(Identifiable):
external_id: str
payload: Dict[str, Union[Primitive, FileTypeContent, BinaryIO]]
payload: PayloadType = field(default_factory=dict)
identify_dimensions_by_external_id: bool = field(default=True)

@staticmethod
Expand Down

0 comments on commit c55f2cb

Please sign in to comment.