ini_file: fix lint error (#5307) (#5308)

* ini_file: fix lint error

* add changelog fragment

* remove line from sanity test ignore files

(cherry picked from commit f0ee21b8b2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2022-09-25 21:07:35 +02:00
committed by GitHub
parent 6572f46998
commit b165337bbe
5 changed files with 3 additions and 4 deletions

View File

@@ -310,7 +310,7 @@ def do_ini(module, filename, section=None, option=None, values=None,
# override option with no value to option with value if not allow_no_value
if len(values) > 0:
for index, line in enumerate(section_lines):
if not changed_lines[index] and match_active_opt(option, section_lines[index]): # pylint: disable=unnecessary-list-index-lookup
if not changed_lines[index] and match_active_opt(option, line):
newline = assignment_format % (option, values.pop(0))
(changed, msg) = update_section_line(changed, section_lines, index, changed_lines, newline, msg)
if len(values) == 0: