From 2af6314f57676b88895ed88996cd71d6c33cb162 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 10 Apr 2015 04:01:18 -0700 Subject: [PATCH] Comment to clarify why we add one to the line and column recording --- v2/ansible/parsing/yaml/constructor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/v2/ansible/parsing/yaml/constructor.py b/v2/ansible/parsing/yaml/constructor.py index 97f9c71ef8..d1a2a01bc2 100644 --- a/v2/ansible/parsing/yaml/constructor.py +++ b/v2/ansible/parsing/yaml/constructor.py @@ -58,6 +58,7 @@ class AnsibleConstructor(Constructor): def _node_position_info(self, node): # the line number where the previous token has ended (plus empty lines) + # Add one so that the first line is line 1 rather than line 0 column = node.start_mark.column + 1 line = node.start_mark.line + 1