Projet

Général

Profil

0045-misc-fix-use-implicit-booleaness-not-len-pylint-erro.patch

Lauréline Guérin, 22 mars 2022 10:31

Télécharger (1,34 ko)

Voir les différences:

Subject: [PATCH 45/65] misc: fix use-implicit-booleaness-not-len pylint error
 (#62099)

 passerelle/contrib/utils/axel.py | 2 +-
 passerelle/utils/xml.py          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
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
-