mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
do not use names which conflict with builtin str type
This commit is contained in:
parent
85884e3fdd
commit
d0844e8bbe
@ -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…
x
Reference in New Issue
Block a user