Skip to content

Commit

Permalink
fixed wrong abstract class
Browse files Browse the repository at this point in the history
  • Loading branch information
davebulaval committed Jan 9, 2021
1 parent 6edf17c commit c61c46b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/source/notificator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Notificator
.. automodule:: notif
.. currentmodule:: notif.notificator

Notification
Notificator
---------------
.. autoclass:: Notification
.. autoclass:: Notificator
:members:

Slack Notificator
Expand Down
12 changes: 6 additions & 6 deletions notif/notificator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
pymsteams = None


class Notification(ABC):
class Notificator(ABC):
# pylint: disable=line-too-long
"""
Abstract class to define a notification. Force implementation of method `send_notification` and specify how to send
Abstract class to define a notificator. Force implementation of method `send_notification` and specify how to send
a notification error.
Args:
Expand Down Expand Up @@ -79,7 +79,7 @@ def _parse_error(error: Exception) -> str:
return formatted_error_message


class SlackNotificator(Notification):
class SlackNotificator(Notificator):
# pylint: disable=line-too-long
"""
Notificator to send a notification into a Slack channel.
Expand Down Expand Up @@ -140,7 +140,7 @@ def send_notification(self, message: str, subject: Union[str, None] = None) -> N
warnings.warn("Second error when trying to send notification, will abort sending message.", Warning)


class EmailNotificator(Notification):
class EmailNotificator(Notificator):
# pylint: disable=line-too-long
"""
Notificator to send a notification email.
Expand Down Expand Up @@ -228,7 +228,7 @@ def __del__(self):
self.smtp_server.quit()


class ChannelNotificator(Notification):
class ChannelNotificator(Notificator):
# pylint: disable=line-too-long
"""
Wrapper around notify_run to send a notification to a phone or a desktop. Can have multiple devices in
Expand Down Expand Up @@ -283,7 +283,7 @@ def send_notification(self, message: str, subject: Union[str, None] = None) -> N
warnings.warn("Second error when trying to send notification, will abort sending message.", Warning)


class TeamsNotificator(Notification):
class TeamsNotificator(Notificator):
# pylint: disable=line-too-long
"""
Notificator to send a notification into a Microsoft Teams channel.
Expand Down
2 changes: 1 addition & 1 deletion notif/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5'
__version__ = '0.5.2'

0 comments on commit c61c46b

Please sign in to comment.