Skip to content

Commit

Permalink
Merge branch 'dev' into 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 committed Aug 1, 2024
2 parents ea24559 + 2fac62d commit 5659530
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/syft/src/syft/service/notifier/notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import TypeVar

# third party
from pydantic import BaseModel
from result import Err
from result import Ok
from result import Result
Expand All @@ -33,7 +34,7 @@
from .smtp_client import SMTPClient


class BaseNotifier:
class BaseNotifier(BaseModel):
def send(
self, target: SyftVerifyKey, notification: Notification
) -> SyftSuccess | SyftError:
Expand All @@ -54,7 +55,7 @@ class UserNotificationActivity(SyftObject):
@serializable(canonical_name="EmailNotifier", version=1)
class EmailNotifier(BaseNotifier):
smtp_client: SMTPClient
sender = ""
sender: str = ""

def __init__(
self,
Expand Down
5 changes: 3 additions & 2 deletions packages/syft/src/syft/service/notifier/smtp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import smtplib

# third party
from pydantic import BaseModel
from result import Err
from result import Ok
from result import Result


class SMTPClient:
SOCKET_TIMEOUT = 5 # seconds
class SMTPClient(BaseModel):
SOCKET_TIMEOUT: int = 5 # seconds

def __init__(
self,
Expand Down

0 comments on commit 5659530

Please sign in to comment.