aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BibTeX.py9
-rw-r--r--config.py1
-rw-r--r--metaphone.py8
-rw-r--r--reconcile.py1
-rwxr-xr-xupdateCache.py1
5 files changed, 4 insertions, 16 deletions
diff --git a/BibTeX.py b/BibTeX.py
index 2062988..065aa5b 100644
--- a/BibTeX.py
+++ b/BibTeX.py
@@ -549,7 +549,7 @@ class BibTeXEntry:
res.append("</span><br />\n")
res.append(self.biblio_to_html())
res.append("<a href='#%s'>&middot;</a>"%url_untranslate(self.key))
- res.append("</p>"),
+ res.append("</p>")
if self.get('www_remarks'):
res.append("<p class='remarks'>%s</span>"%htmlize(
@@ -667,12 +667,6 @@ class ParsedAuthor:
(self.von == o.von) and
(self.jr == o.jr))
- def __neq__(self, o):
- return ((self.first != o.first) or
- (self.last != o.last) or
- (self.von != o.von) or
- (self.jr != o.jr))
-
def __hash__(self):
return hash(repr(self))
@@ -1170,7 +1164,6 @@ def parseString(string, result=None):
return r
if __name__ == '__main__':
- import sys
if len(sys.argv)>1:
fname=sys.argv[1]
else:
diff --git a/config.py b/config.py
index 68fbbf7..41ee14e 100644
--- a/config.py
+++ b/config.py
@@ -10,6 +10,7 @@ _KEYS = [ "ALPHABETIZE_AUTHOR_AS","AUTHOR_URLS","CACHE_DIR","CACHE_SECTIONS",
for _k in _KEYS:
globals()[_k]=None
+del _k
def load(cfgFile):
mod = {}
diff --git a/metaphone.py b/metaphone.py
index e86d4fc..8eb8257 100644
--- a/metaphone.py
+++ b/metaphone.py
@@ -9,8 +9,6 @@
Based on the original C++ metaphone implementation.)
"""
-import string
-
TRIPLES = {
'dge': 'j',
'dgi': 'j',
@@ -62,7 +60,7 @@ def metaphone(s):
# Change "x" to "s"
if s[0] == 'x':
- x = "s%s" % s[1:]
+ s = "s%s" % s[1:]
# Get rid of "h" in "wh".
if s[:2] == 'wh':
@@ -118,15 +116,13 @@ def metaphone(s):
vowelBefore = prevLtr in "aeiou"
curLtr = s[idx]
- nextLtr2 = nextLtr3 = ' '
+ nextLtr2 = ' '
if idx < lastChar:
nextLtr = s[idx+1]
vowelAfter = nextLtr in "aeiou"
frontvAfter = nextLtr in "eiy"
if idx+1 < lastChar:
nextLtr2 = s[idx+2]
- if idx+2 < lastChar:
- nextLtr3 = s[idx+3]
else:
nextLtr = ' '
vowelAfter = frontvAfter = 0
diff --git a/reconcile.py b/reconcile.py
index 5df1465..111ac73 100644
--- a/reconcile.py
+++ b/reconcile.py
@@ -100,7 +100,6 @@ class MasterBibTeX(BibTeX.BibTeX):
return 0
def _initialize(self, name):
- n1 = name
name = " ".join(name).lower()
name = re.sub(r'([a-z])[a-z\.]*', r'\1', name)
name = clean(name)
diff --git a/updateCache.py b/updateCache.py
index 8e1af06..de3216c 100755
--- a/updateCache.py
+++ b/updateCache.py
@@ -111,7 +111,6 @@ def downloadAll(bibtex, missingOnly=0):
key = e.key
section = e.get("www_cache_section", ".")
for ftype, url in urls.items():
- fname = getCacheFname(key, ftype, section)
if missingOnly:
cachedURL = getCachedURL(key, ftype, section)
if cachedURL == url: