mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 21:04:29 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4306e8b34b | ||
|
|
2ce3898690 | ||
|
|
16f257356e |
@@ -3,6 +3,12 @@
|
||||
Changelog
|
||||
---------
|
||||
|
||||
0.6.1 (2020-02-03)
|
||||
++++++++++++++++++
|
||||
|
||||
- Add ``parso.normalizer.Issue.end_pos`` to make it possible to know where an
|
||||
issue ends
|
||||
|
||||
0.6.0 (2020-01-26)
|
||||
++++++++++++++++++
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ from parso.grammar import Grammar, load_grammar
|
||||
from parso.utils import split_lines, python_bytes_to_unicode
|
||||
|
||||
|
||||
__version__ = '0.6.0'
|
||||
__version__ = '0.6.1'
|
||||
|
||||
|
||||
def parse(code=None, **kwargs):
|
||||
|
||||
@@ -119,7 +119,6 @@ class NormalizerConfig(object):
|
||||
|
||||
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.
|
||||
@@ -133,6 +132,7 @@ class Issue(object):
|
||||
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.
|
||||
"""
|
||||
self.end_pos = node.end_pos
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.start_pos == other.start_pos and self.code == other.code
|
||||
|
||||
Reference in New Issue
Block a user