Adjust settings for linters (#23)

This commit is contained in:
Sergey Petrov
2017-01-08 13:07:22 +03:00
committed by GitHub
parent d72990625f
commit b917868b15
6 changed files with 28 additions and 5 deletions
-1
View File
@@ -1 +0,0 @@
+4 -2
View File
@@ -22,8 +22,10 @@ class APNsClient(object):
self.__connection = HTTP20Connection(server, port, ssl_context=ssl_context, force_proto=proto or 'h2')
self.__json_encoder = json_encoder
def send_notification(self, token_hex, notification, priority=NotificationPriority.Immediate, topic=None, expiration=None):
json_payload = dumps(notification.dict(), cls=self.__json_encoder, ensure_ascii=False, separators=(',', ':')).encode('utf-8')
def send_notification(self, token_hex, notification, priority=NotificationPriority.Immediate, topic=None,
expiration=None):
json_str = dumps(notification.dict(), cls=self.__json_encoder, ensure_ascii=False, separators=(',', ':'))
json_payload = json_str.encode('utf-8')
headers = {
'apns-priority': priority.value
+1 -2
View File
@@ -5,8 +5,7 @@ class PayloadAlert(object):
def __init__(self, title=None, title_localized_key=None, title_localized_args=None,
body=None, body_localized_key=None, body_localized_args=None,
action_localized_key=None,
launch_image=None
):
launch_image=None):
self.title = title
self.title_localized_key = title_localized_key
self.title_localized_args = title_localized_args