Projet

Général

Profil

0002-trivial-fix-consider-using-ternary-pylint-warning-52.patch

Frédéric Péters, 04 avril 2021 17:20

Télécharger (1,31 ko)

Voir les différences:

Subject: [PATCH 02/15] trivial: fix consider-using-ternary pylint warning
 (#52732)

 pylint.rc          | 1 -
 wcs/qommon/form.py | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
pylint.rc
14 14
    broad-except,
15 15
    consider-using-dict-comprehension,
16 16
    consider-using-set-comprehension,
17
    consider-using-ternary,
18 17
    cyclic-import,
19 18
    deprecated-module,
20 19
    disallowed-name,
wcs/qommon/form.py
209 209
    def render_content(self):
210 210
        if self.name in ('cancel', 'previous', 'save-draft'):
211 211
            self.attrs['formnovalidate'] = 'formnovalidate'
212
        value = self.label and htmlescape(self.label) or None
212
        value = htmlescape(self.label) if self.label else None
213 213
        return (
214 214
            htmltag('button', name=self.name, value=value, **self.attrs) + self.label + htmltext('</button>')
215 215
        )
216
-