Skip to content

Commit ec7599c

Browse files
authored
jinja[spacing]: Avoid evaluating noqa comments (#2329)
Fixes: #2318
1 parent 8b719f4 commit ec7599c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ansiblelint/yaml_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ def _nested_items_path(
237237
f"of type '{type(data_collection)}'"
238238
)
239239
for key, value in convert_data_collection_to_tuples():
240+
if key in ("skipped_rules", "__file__", "__line__"):
241+
continue
240242
yield key, value, parent_path
241243
if isinstance(value, (dict, list)):
242244
yield from _nested_items_path(

0 commit comments

Comments
 (0)