mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-09 05:55:29 +01:00
do not use names which conflict with builtin str type
This commit is contained in:
parent
85884e3fdd
commit
d0844e8bbe
2 changed files with 7 additions and 7 deletions
|
|
@ -21,15 +21,15 @@ def _clean(s):
|
|||
|
||||
|
||||
def _detag(tag):
|
||||
str = u""
|
||||
ans = u""
|
||||
if tag is None:
|
||||
return str
|
||||
return ans
|
||||
for elem in tag:
|
||||
if hasattr(elem, "contents"):
|
||||
str += _detag(elem)
|
||||
ans += _detag(elem)
|
||||
else:
|
||||
str += _clean(elem)
|
||||
return str
|
||||
ans += _clean(elem)
|
||||
return ans
|
||||
|
||||
|
||||
def _metadata_from_table(soup, searchfor):
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ def recipe_test(option, opt_str, value, parser):
|
|||
assert value is None
|
||||
value = []
|
||||
|
||||
def floatable(str):
|
||||
def floatable(s):
|
||||
try:
|
||||
float(str)
|
||||
float(s)
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in a new issue