From a604fca5cc52044dcc183710a795b5fbb376e4b8 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 14 Mar 2021 16:18:11 +0100 Subject: [PATCH] Improved comments of mailing --- src/cpl/mailing/email_client_abc.py | 18 ++++++++++++++++-- src/cpl/mailing/email_client_service.py | 9 --------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/cpl/mailing/email_client_abc.py b/src/cpl/mailing/email_client_abc.py index fc668faf..59041782 100644 --- a/src/cpl/mailing/email_client_abc.py +++ b/src/cpl/mailing/email_client_abc.py @@ -8,10 +8,24 @@ class EMailClientABC(ServiceABC): @abstractmethod def __init__(self): + """ + ABC to send emails + """ ServiceABC.__init__(self) @abstractmethod - def connect(self): pass + def connect(self): + """ + Connects to server + :return: + """ + pass @abstractmethod - def send_mail(self, email: EMail): pass + def send_mail(self, email: EMail): + """ + Sends email + :param email: + :return: + """ + pass diff --git a/src/cpl/mailing/email_client_service.py b/src/cpl/mailing/email_client_service.py index de85c1c3..42204dec 100644 --- a/src/cpl/mailing/email_client_service.py +++ b/src/cpl/mailing/email_client_service.py @@ -39,10 +39,6 @@ class EMailClient(EMailClientABC): self._logger.trace(__name__, f'Stopped {__name__}.create') def connect(self): - """ - Connects to server - :return: - """ self._logger.trace(__name__, f'Started {__name__}.connect') try: self._logger.debug(__name__, f'Try to connect to {self._mail_settings.host}:{self._mail_settings.port}') @@ -73,11 +69,6 @@ class EMailClient(EMailClientABC): self._logger.trace(__name__, f'Stopped {__name__}.login') def send_mail(self, email: EMail): - """ - Sends email - :param email: - :return: - """ self._logger.trace(__name__, f'Started {__name__}.send_mail') try: self.login()