summaryrefslogtreecommitdiff
path: root/events.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2021-05-06 08:36:49 +0200
committerAnthon van der Neut <anthon@mnt.org>2021-05-06 08:36:49 +0200
commit17b35c376fd0fc9a94ba0adfdbf5bf63a6177dc9 (patch)
tree49a76a7328cbc20efde9603d5373ecf003adbbc6 /events.py
parent3d77f16e00124b74e150625396617b41e41da014 (diff)
downloadruamel.yaml-17b35c376fd0fc9a94ba0adfdbf5bf63a6177dc9.tar.gz
* extend EOL token handling
* extending comment
Diffstat (limited to 'events.py')
-rw-r--r--events.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/events.py b/events.py
index ef63dad..e0c7f68 100644
--- a/events.py
+++ b/events.py
@@ -7,6 +7,8 @@ from ruamel.yaml.compat import _F
if False: # MYPY
from typing import Any, Dict, Optional, List # NOQA
+SHOW_LINES = False
+
def CommentCheck():
# type: () -> None
@@ -37,6 +39,9 @@ class Event:
arguments.append(_F('{key!s}={v!r}', key=key, v=v))
if self.comment not in [None, CommentCheck]:
arguments.append('comment={!r}'.format(self.comment))
+ if SHOW_LINES:
+ arguments.append('({}:{}/{}:{})'.format(self.start_mark.line, self.start_mark.column,
+ self.end_mark.line, self.end_mark.column))
arguments = ', '.join(arguments)
else:
attributes = [