mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-09 13:32:20 +08:00
Use repr() for the Whitespace repr
This makes whitespace appear as <Whitespace: '\n'> instead of <Whitespace: >.
This commit is contained in:
@@ -248,6 +248,10 @@ class LeafWithNewLines(Leaf):
|
||||
return end_pos_line, end_pos_col
|
||||
|
||||
|
||||
@utf8_repr
|
||||
def __repr__(self):
|
||||
return "<%s: %r>" % (type(self).__name__, self.value)
|
||||
|
||||
class Whitespace(LeafWithNewLines):
|
||||
"""Contains NEWLINE and ENDMARKER tokens."""
|
||||
__slots__ = ()
|
||||
|
||||
Reference in New Issue
Block a user