Skip to content

Commit

Permalink
type cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbiannaccone committed Mar 22, 2024
1 parent 5e27ff0 commit e844855
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions canvas_sdk/effects/banner_alert/banner_alert.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

from pydantic import Field

from canvas_sdk.effects.banner_alert.constants import (
Expand All @@ -21,7 +23,7 @@ class Meta:
intents: list[BannerAlertIntent] = Field(min_length=1)

@property
def values(self) -> dict:
def values(self) -> dict[str, Any]:
"""The BannerAlert's values."""
return {
"narrative": self.narrative,
Expand All @@ -30,6 +32,6 @@ def values(self) -> dict:
}

@property
def effect_payload(self) -> dict:
def effect_payload(self) -> dict[str, Any]:
"""The payload of the effect."""
return {"patient": self.patient_key, "data": self.values}
6 changes: 4 additions & 2 deletions canvas_sdk/effects/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

from pydantic import BaseModel, ConfigDict

from plugin_runner.generated.messages.effects_pb2 import Effect
Expand All @@ -14,11 +16,11 @@ class Meta:
model_config = ConfigDict(strict=True, validate_assignment=True)

@property
def values(self) -> dict:
def values(self) -> dict[str, Any]:
return {}

@property
def effect_payload(self) -> dict:
def effect_payload(self) -> dict[str, Any]:
return {"data": self.values}

def apply(self) -> Effect:
Expand Down

0 comments on commit e844855

Please sign in to comment.