tokenizer: improve token representation when value is None

This commit is contained in:
Antoine Viallon 2023-05-08 17:31:46 +02:00
parent 9258b98a9a
commit 86457c6972
Signed by: aviallon
GPG key ID: D126B13AB555E16F

View file

@ -17,8 +17,6 @@ class Token:
value: Optional[str] = field(compare=False, hash=False, default=None)
def __repr__(self):
if self.value is None:
return super().__repr__()
return f"{self.kind.name}({repr(self.value)})"