From 5dd7f691c01c3687b9498c806fc41b09a69cab11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 17 Sep 2023 09:38:05 +0300 Subject: [PATCH] Fix `vText.__repr__` `BytesWarning` Exposed by running in `python3 -b` mode. --- src/icalendar/prop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index f322f65e..22314165 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -719,7 +719,7 @@ def __new__(cls, value, encoding=DEFAULT_ENCODING): return self def __repr__(self): - return f"vText('{self.to_ical()}')" + return f"vText('{self.to_ical()!r}')" def to_ical(self): return escape_char(self).encode(self.encoding)