Fix PEP257 issues
This commit is contained in:
1 parent
cf7c2c492a
commit
652f059d6a
19 files changed
+86
-131
No files matched your search
@@ -1,6 +1,4 @@
|
||||
"""
|
||||
homeassistant.components.notify.pushetta
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Pushetta platform for notify component.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
@@ -19,8 +17,7 @@ REQUIREMENTS = ['pushetta==1.0.15']
|
||||
|
||||
|
||||
def get_service(hass, config):
|
||||
""" Get the Pushetta notification service. """
|
||||
|
||||
"""Get the Pushetta notification service."""
|
||||
from pushetta import Pushetta, exceptions
|
||||
|
||||
if not validate_config({DOMAIN: config},
|
||||
@@ -44,20 +41,17 @@ def get_service(hass, config):
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class PushettaNotificationService(BaseNotificationService):
|
||||
""" Implements notification service for Pushetta. """
|
||||
"""Implement the notification service for Pushetta."""
|
||||
|
||||
def __init__(self, api_key, channel_name):
|
||||
|
||||
"""Initialize the service."""
|
||||
from pushetta import Pushetta
|
||||
|
||||
self._api_key = api_key
|
||||
self._channel_name = channel_name
|
||||
self.pushetta = Pushetta(self._api_key)
|
||||
|
||||
def send_message(self, message="", **kwargs):
|
||||
""" Send a message to a user. """
|
||||
|
||||
"""Send a message to a user."""
|
||||
title = kwargs.get(ATTR_TITLE)
|
||||
|
||||
self.pushetta.pushMessage(self._channel_name,
|
||||
"{} {}".format(title, message))
|
||||
Reference in new issue
Block a user