misc: add comments to disable new pylint false positives

This commit is contained in:
Frédéric Péters 2021-05-30 22:50:29 +02:00
parent d8b7b5342b
commit c868c778cd
3 changed files with 5 additions and 0 deletions

View File

@ -163,8 +163,11 @@ def test_get_tenants():
def test_register_cronjobs():
pub.register_cronjobs()
# noqa pylint: disable=not-an-iterable
assert 'apply_global_action_timeouts' in [x.function.__name__ for x in pub.cronjobs]
# noqa pylint: disable=not-an-iterable
assert 'clean_sessions' in [x.function.__name__ for x in pub.cronjobs]
# noqa pylint: disable=not-an-iterable
assert 'evaluate_jumps' in [x.name for x in pub.cronjobs]

View File

@ -86,6 +86,7 @@ def test_user_formdef_getattr():
user.form_data = {'3': 'Bar', '9': 'Foo'}
assert user.plop == 'Bar'
# noqa pylint: disable=comparison-with-callable
assert user.get_formdef != 'Foo'
with pytest.raises(AttributeError):

View File

@ -345,6 +345,7 @@ class Field:
atname = attribute[:-1]
else:
atname = 'item'
# noqa pylint: disable=not-an-iterable
for v in val:
ET.SubElement(el, atname).text = force_text(v, charset, errors='replace')
elif isinstance(val, str):