From 545bdfb96646f82b09968c0b0150f235815cd3cb Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 9 Aug 2024 11:12:02 +0200 Subject: [PATCH] Code style --- pretalx_broadcast_tools/apps.py | 1 + pretalx_broadcast_tools/exporter.py | 2 +- pretalx_broadcast_tools/views/qr.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pretalx_broadcast_tools/apps.py b/pretalx_broadcast_tools/apps.py index 77ab4ac..4834890 100644 --- a/pretalx_broadcast_tools/apps.py +++ b/pretalx_broadcast_tools/apps.py @@ -1,5 +1,6 @@ from django.apps import AppConfig from django.utils.translation import gettext_lazy + from pretalx_broadcast_tools import __version__ diff --git a/pretalx_broadcast_tools/exporter.py b/pretalx_broadcast_tools/exporter.py index 2c2d2bd..fcd87e1 100644 --- a/pretalx_broadcast_tools/exporter.py +++ b/pretalx_broadcast_tools/exporter.py @@ -17,7 +17,7 @@ from reportlab.platypus import ( TableStyle, ) -from .utils.placeholders import placeholders +from pretalx_broadcast_tools.utils.placeholders import placeholders A4_WIDTH, A4_HEIGHT = A4 PAGE_PADDING = 10 * mm diff --git a/pretalx_broadcast_tools/views/qr.py b/pretalx_broadcast_tools/views/qr.py index 618b562..ec55d65 100644 --- a/pretalx_broadcast_tools/views/qr.py +++ b/pretalx_broadcast_tools/views/qr.py @@ -1,4 +1,4 @@ -from xml.etree import ElementTree as ET +from xml.etree import ElementTree import qrcode import qrcode.image.svg @@ -15,7 +15,7 @@ class BroadcastToolsFeedbackQrCodeSvg(View): image = qrcode.make( f"{domain}{talk.urls.feedback}", image_factory=qrcode.image.svg.SvgImage ) - svg_data = mark_safe(ET.tostring(image.get_image()).decode()) + svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode()) return HttpResponse(svg_data, content_type="image/svg+xml") @@ -26,5 +26,5 @@ class BroadcastToolsPublicQrCodeSvg(View): image = qrcode.make( f"{domain}{talk.urls.public}", image_factory=qrcode.image.svg.SvgImage ) - svg_data = mark_safe(ET.tostring(image.get_image()).decode()) + svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode()) return HttpResponse(svg_data, content_type="image/svg+xml")