mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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):
|
def _detag(tag):
|
||||||
str = u""
|
ans = u""
|
||||||
if tag is None:
|
if tag is None:
|
||||||
return str
|
return ans
|
||||||
for elem in tag:
|
for elem in tag:
|
||||||
if hasattr(elem, "contents"):
|
if hasattr(elem, "contents"):
|
||||||
str += _detag(elem)
|
ans += _detag(elem)
|
||||||
else:
|
else:
|
||||||
str += _clean(elem)
|
ans += _clean(elem)
|
||||||
return str
|
return ans
|
||||||
|
|
||||||
|
|
||||||
def _metadata_from_table(soup, searchfor):
|
def _metadata_from_table(soup, searchfor):
|
||||||
|
@ -124,9 +124,9 @@ def recipe_test(option, opt_str, value, parser):
|
|||||||
assert value is None
|
assert value is None
|
||||||
value = []
|
value = []
|
||||||
|
|
||||||
def floatable(str):
|
def floatable(s):
|
||||||
try:
|
try:
|
||||||
float(str)
|
float(s)
|
||||||
return True
|
return True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user