From 561e60efee395495c702f0b9954a9739df5cc5ae Mon Sep 17 00:00:00 2001 From: enkore Date: Fri, 15 Feb 2013 18:38:18 +0100 Subject: [PATCH] Consistent quotes --- i3pystatus/__init__.py | 8 ++++---- i3pystatus/__main__.py.dist | 34 +++++++++++++++++----------------- i3pystatus/modsde.py | 4 +--- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/i3pystatus/__init__.py b/i3pystatus/__init__.py index 4f8ba44..c4ab004 100644 --- a/i3pystatus/__init__.py +++ b/i3pystatus/__init__.py @@ -32,7 +32,7 @@ class I3statusHandler: def print_line(self, message): """Unbuffered printing to stdout.""" - sys.stdout.write(message + '\n') + sys.stdout.write(message + "\n") sys.stdout.flush() def read_line(self): @@ -61,11 +61,11 @@ class I3statusHandler: module.thread.start() while True: - line, prefix = self.read_line(), '' + line, prefix = self.read_line(), "" # ignore comma at start of lines - if line.startswith(','): - line, prefix = line[1:], ',' + if line.startswith(","): + line, prefix = line[1:], "," j = json.loads(line) diff --git a/i3pystatus/__main__.py.dist b/i3pystatus/__main__.py.dist index 5d3448e..2b4f391 100755 --- a/i3pystatus/__main__.py.dist +++ b/i3pystatus/__main__.py.dist @@ -13,23 +13,23 @@ status = I3statusHandler() # The imap checker module mailsettings = { - 'color': '#ff0000', - 'servers': [ + "color": "#ff0000", + "servers": [ { - 'host': 'www.testhost1.com', - 'port': '993', - 'ssl' : True, - 'username': 'your_username', - 'password': 'your_password', - 'pause': 20 + "host": "www.testhost1.com", + "port": "993", + "ssl" : True, + "username": "your_username", + "password": "your_password", + "pause": 20 }, { - 'host': 'www.testhost2.net', - 'port': '993', - 'ssl' : True, - 'username': 'your_username', - 'password': 'your_password', - 'pause': 20 + "host": "www.testhost2.net", + "port": "993", + "ssl" : True, + "username": "your_username", + "password": "your_password", + "pause": 20 } ] } @@ -38,14 +38,14 @@ status.register_module(mailchecker) # the mods.de forum new bookmarks module mdesettings = { - 'username': "your_username", - 'password': "your_password" + "username": "your_username", + "password": "your_password" } mde = modsde.ModsDeChecker(mdesettings) status.register_module(mde) # the notmuch mail checker module -db_path = 'path_to_your_notmuch_database' +db_path = "path_to_your_notmuch_database" notmuch = notmuchmailchecker.NotmuchMailChecker(db_path) status.register_module(notmuch) diff --git a/i3pystatus/modsde.py b/i3pystatus/modsde.py index d98d10b..72dd8db 100644 --- a/i3pystatus/modsde.py +++ b/i3pystatus/modsde.py @@ -29,8 +29,6 @@ class ModsDeChecker(Module): settings = { "color": "#7181fe", "pause": 20, - "username": "", - "password": "", "offset": 0, "format": "%d new posts in bookmarks" } @@ -86,5 +84,5 @@ class ModsDeChecker(Module): for cookie in self.cj: self.cj.clear self.logged_in = True - self.opener.addheaders.append(('Cookie', '{}={}'.format(cookie.name, cookie.value))) + self.opener.addheaders.append(("Cookie", "{}={}".format(cookie.name, cookie.value))) return True