0002-trivial-fix-consider-using-ternary-pylint-warning-52.patch
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 |
- |