Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
beucismis committed Feb 27, 2022
1 parent 50be1e8 commit 49a11ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easynewsletter/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
import schedule
from . import util
from typing import List
from .database import Database
from .subscriber import Subscriber
from .easyemail import Email, Message
Expand All @@ -27,7 +28,7 @@ def __init__(self, email: Email, database: Database) -> None:
def __repr__(self) -> str:
return f"<Newsletter(email={self.email}, database={self.database})>"

def add_subscriber(self, subscribers: list[Subscriber]) -> None:
def add_subscriber(self, subscribers: List[Subscriber]) -> None:
"""Adds the subscribers in the list to the database.
Parameters
Expand All @@ -39,7 +40,7 @@ def add_subscriber(self, subscribers: list[Subscriber]) -> None:
with self.database as db:
db.insert([s.to_tuple() for s in subscribers])

def remove_subscriber(self, subscribers: list[Subscriber]) -> None:
def remove_subscriber(self, subscribers: List[Subscriber]) -> None:
"""Removes the subscribers in the list from the database.
Parameters
Expand Down

0 comments on commit 49a11ee

Please sign in to comment.