misc: pylint fix consider-using-in (#52222)
This commit is contained in:
parent
f2a3f4c300
commit
17d73057b7
|
@ -1934,7 +1934,7 @@ class FormPage(Directory):
|
|||
field_options = filter_field.get_options()
|
||||
if field_options and type(field_options[0]) in (list, tuple):
|
||||
for option in field_options:
|
||||
if option[0] == filter_field_value or option[-1] == filter_field_value:
|
||||
if filter_field_value in (option[0], option[-1]):
|
||||
filter_field_value = option[1]
|
||||
break
|
||||
criterias[-1]._label = '%s: %s' % (filter_field.label, filter_field_value)
|
||||
|
|
|
@ -1653,7 +1653,7 @@ class CaptchaWidget(CompositeWidget):
|
|||
self.add(HtmlWidget, 'token', title=hidden_input % (self.name, token['token']))
|
||||
|
||||
# create question, and fill token['answer']
|
||||
if mode == 'arithmetic' or mode == 'arithmetic-simple':
|
||||
if mode in ('arithmetic', 'arithmetic-simple'):
|
||||
a, b = random.randint(2, 9), random.randint(2, 9)
|
||||
while b == a:
|
||||
# don't get twice the same number
|
||||
|
|
Loading…
Reference in New Issue