Skip to content

Commit 07cf5eb

Browse files
StopMotionCuberaudgirka
authored andcommitted
More linting fixes
1 parent 640983e commit 07cf5eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ansiblelint/skip_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def _continue_skip_next_lines(
268268
if _noqa_comment_line_re.fullmatch(line_content[line_no - 1]):
269269
# Find next non-empty line
270270
next_line_no = line_no
271-
while next_line_no < len(line_content) and line_content[next_line_no].strip():
271+
while next_line_no < len(line_content) and not line_content[next_line_no].strip():
272272
next_line_no += 1
273273
if next_line_no >= len(line_content):
274274
continue

test/test_skiputils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_playbook_noqa2(default_text_runner: RunFromText) -> None:
6666

6767
def test_var_noqa(default_text_runner: RunFromText) -> None:
6868
"""Check that noqa is properly taken into account on vars and tasks."""
69-
results = default_text_runner.run("examples/playbooks/vars/noqa_multiline.yml")
69+
results = default_text_runner.run(Path("examples/playbooks/vars/noqa_multiline.yml"))
7070
# Should raise no error at "SOME_VAR".
7171
assert len(results) == 0
7272

0 commit comments

Comments
 (0)