Skip to content

Commit 9e4727a

Browse files
authored
Fixed printing of error location
* The error indicators are now offset by `self.offsetInContext`
1 parent 3211982 commit 9e4727a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎language_tool_python/match.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __str__(self):
8484
if self.replacements:
8585
s += '\nSuggestion: {}'.format('; '.join(self.replacements))
8686
s += '\n{}\n{}'.format(
87-
self.context, ' ' * self.offset + '^' * self.errorLength
87+
self.context, ' ' * self.offsetInContext + '^' * self.errorLength
8888
)
8989
return s
9090

@@ -113,4 +113,4 @@ def __setattr__(self, key, value):
113113
def __getattr__(self, name):
114114
if name not in get_match_ordered_dict():
115115
raise AttributeError('{!r} object has no attribute {!r}'
116-
.format(self.__class__.__name__, name))
116+
.format(self.__class__.__name__, name))

0 commit comments

Comments
 (0)