From d11d4cc8c19a9cd41b950ef86fb87862fa1f9cbe Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 9 Jan 2011 17:41:42 +0100 Subject: [PATCH] Pylint, remove fixed todos --- radicale/__init__.py | 1 + radicale/acl/htpasswd.py | 2 +- radicale/config.py | 2 -- radicale/ical.py | 1 - radicale/xmlutils.py | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index b842b6a5..ebcfe161 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -90,6 +90,7 @@ class HTTPServer(server.HTTPServer): class HTTPSServer(HTTPServer): """HTTPS server.""" PROTOCOL = "https" + def __init__(self, address, handler): """Create server by wrapping HTTP socket in an SSL socket.""" # Fails with Python 2.5, import if needed diff --git a/radicale/acl/htpasswd.py b/radicale/acl/htpasswd.py index bb2f26bc..f6413516 100644 --- a/radicale/acl/htpasswd.py +++ b/radicale/acl/htpasswd.py @@ -49,7 +49,7 @@ def _sha1(hash_value, password): """Check if ``hash_value`` and ``password`` match using sha1 method.""" hash_value = hash_value.replace("{SHA}", "").encode("ascii") password = password.encode(config.get("encoding", "stock")) - sha1 = hashlib.sha1() + sha1 = hashlib.sha1() # pylint: disable=E1101 sha1.update(password) return sha1.digest() == base64.b64decode(hash_value) diff --git a/radicale/config.py b/radicale/config.py index 1cf9dd67..8c372807 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -25,8 +25,6 @@ Give a configparser-like interface to read and write configuration. """ -# TODO: Use abstract filenames for other platforms - import os import sys # Manage Python2/3 different modules diff --git a/radicale/ical.py b/radicale/ical.py index cff038f8..b1567411 100644 --- a/radicale/ical.py +++ b/radicale/ical.py @@ -135,7 +135,6 @@ class Calendar(object): def __init__(self, path): """Initialize the calendar with ``cal`` and ``user`` parameters.""" - # TODO: Use properties from the calendar configuration self.encoding = "utf-8" self.owner = path.split("/")[0] self.path = os.path.join(FOLDER, path.replace("/", os.path.sep)) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 11cb1756..d300e0ed 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -150,7 +150,7 @@ def propfind(path, xml_request, calendar, depth): element.append(tag) elif tag == _tag("C", "supported-calendar-component-set"): comp = ET.Element(_tag("C", "comp")) - comp.set("name", "VTODO") + comp.set("name", "VTODO") # pylint: disable=W0511 element.append(comp) comp = ET.Element(_tag("C", "comp")) comp.set("name", "VEVENT")