0045-misc-fix-use-implicit-booleaness-not-len-pylint-erro.patch
passerelle/contrib/utils/axel.py | ||
---|---|---|
57 | 57 |
tree = tree.getroot() |
58 | 58 |
if level < 0: |
59 | 59 |
raise ValueError("Initial indentation level must be >= 0, got {level}".format(level=level)) |
60 |
if not len(tree):
|
|
60 |
if len(tree) == 0:
|
|
61 | 61 |
return |
62 | 62 | |
63 | 63 |
# Reduce the memory consumption by reusing indentation strings. |
passerelle/utils/xml.py | ||
---|---|---|
86 | 86 | |
87 | 87 |
d = {} |
88 | 88 |
for child in root: |
89 |
if not len(child): # text node
|
|
89 |
if len(child) == 0: # text node
|
|
90 | 90 |
value = text_content(child) |
91 | 91 |
if value: |
92 | 92 |
d[child.tag] = value |
93 |
- |