diff options
author | Anthon van der Neut <anthon@mnt.org> | 2021-03-26 11:20:38 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2021-03-26 11:20:38 +0100 |
commit | 09f8576ae990234daebf51cca48b52d564f2c2d2 (patch) | |
tree | e08953ec5547d9ed05373a3134c3557f6ebf11c6 /tokens.py | |
parent | e8719cd39655d98cf2bde1be15366cca7a58fd89 (diff) | |
download | ruamel.yaml-09f8576ae990234daebf51cca48b52d564f2c2d2.tar.gz |
remove support for 2.7, prepare for f-strings0.17.0
Diffstat (limited to 'tokens.py')
-rw-r--r-- | tokens.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -37,6 +37,14 @@ class Token(object): pass return '{}({})'.format(self.__class__.__name__, arguments) + @property + def column(self): + return self.start_mark.column + + @column.setter + def column(self, pos): + self.start_mark.column = pos + def add_post_comment(self, comment): # type: (Any) -> None if not hasattr(self, '_comment'): @@ -267,6 +275,9 @@ class CommentToken(Token): if SHOWLINES: try: v += ', line: ' + str(self.start_mark.line) + except: # NOQA + pass + try: v += ', col: ' + str(self.start_mark.column) except: # NOQA pass |