pylint cleanup

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1752 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-09-06 15:38:30 +00:00
parent be4d10e450
commit 52f1e901af
2 changed files with 7 additions and 10 deletions

View file

@ -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

View file

@ -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"""