Better documentation of issues.

This commit is contained in:
Dave Halter
2017-09-03 23:01:34 +02:00
parent 435d310c2b
commit 5993765e0a
2 changed files with 21 additions and 1 deletions

View File

@@ -121,8 +121,18 @@ class Issue(object):
def __init__(self, node, code, message):
self._node = node
self.code = code
"""
An integer code that stands for the type of error.
"""
self.message = message
"""
A message (string) for the issue.
"""
self.start_pos = node.start_pos
"""
The start position position of the error as a tuple (line, column). As
always in |parso| the first line is 1 and the first column 0.
"""
def __eq__(self, other):
return self.start_pos == other.start_pos and self.code == other.code