Fix `vText.__repr__` `BytesWarning`

Exposed by running in `python3 -b` mode.
pull/554/head
Ville Skyttä 2023-09-17 09:38:05 +03:00
rodzic 923666a998
commit c13af2b5d9
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -12,6 +12,7 @@ Minor changes:
- Move pip caching into Python setup action.
- Check that issue #165 can be closed.
- Updated about.rst for issue #527
- Avoid ``vText.__repr__`` BytesWarning.
Breaking changes:

Wyświetl plik

@ -43,6 +43,7 @@ icalendar contributors
- Thomas Bruederli <thomas@roundcube.net>
- Thomas Weißschuh <thomas@t-8ch.de>
- Victor Varvaryuk <victor.varvariuc@gmail.com>
- Ville Skyttä <ville.skytta@iki.fi>
- Wichert Akkerman <wichert@wiggy.net>
- cillianderoiste <cillian.deroiste@gmail.com>
- fitnr <fitnr@fakeisthenewreal>

Wyświetl plik

@ -719,7 +719,7 @@ class vText(str):
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)