From 52f1e901af47074106ef4916fe723f24b9ac193d Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 6 Sep 2004 15:38:30 +0000 Subject: [PATCH] pylint cleanup git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1752 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/i18n.py | 5 +---- linkcheck/url.py | 12 ++++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/linkcheck/i18n.py b/linkcheck/i18n.py index e9688c74..c121370c 100644 --- a/linkcheck/i18n.py +++ b/linkcheck/i18n.py @@ -21,9 +21,6 @@ import os import locale import gettext -# default gettext function -_ = lambda s: s - # more supported languages are added in init() supported_languages = ['en'] default_language = None @@ -32,7 +29,7 @@ def init (domain, directory): """initialize this gettext i18n module""" global default_language try: - klass = gettext.install(domain, directory) + gettext.install(domain, directory) except IOError: # keep default gettext function pass diff --git a/linkcheck/url.py b/linkcheck/url.py index c1f252a4..d424c9b0 100644 --- a/linkcheck/url.py +++ b/linkcheck/url.py @@ -56,12 +56,12 @@ safe_url_pattern = r"%s://%s%s(#%s)?" % \ (_safe_scheme_pattern, _safe_host_pattern, _safe_path_pattern, _safe_fragment_pattern) -is_safe_url = re.compile("(?i)^%s$"%safe_url_pattern).match -is_safe_domain = re.compile("(?i)^%s$"%_safe_domain_pattern).match -is_safe_host = re.compile("(?i)^%s$"%_safe_host_pattern).match -is_safe_path = re.compile("(?i)^%s$"%_safe_path_pattern).match -is_safe_query = re.compile("(?i)^%s$"%_safe_query_pattern).match -is_safe_fragment = re.compile("(?i)^%s$"%_safe_fragment_pattern).match +is_safe_url = re.compile("(?i)^%s$" % safe_url_pattern).match +is_safe_domain = re.compile("(?i)^%s$" % _safe_domain_pattern).match +is_safe_host = re.compile("(?i)^%s$" % _safe_host_pattern).match +is_safe_path = re.compile("(?i)^%s$" % _safe_path_pattern).match +is_safe_query = re.compile("(?i)^%s$" % _safe_query_pattern).match +is_safe_fragment = re.compile("(?i)^%s$" % _safe_fragment_pattern).match def is_safe_js_url (urlstr): """test javascript URLs"""