From 8a0355c4a02fec39075fd85e032f0f27c5f6a004 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 1 Jul 2024 17:23:04 +0200 Subject: [PATCH] Make sure all icon attributes are `str`s --- emblematic/compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emblematic/compose.py b/emblematic/compose.py index 45246fe..91de72f 100644 --- a/emblematic/compose.py +++ b/emblematic/compose.py @@ -25,8 +25,8 @@ def compose_basic(background: bs4.Tag, icon: bs4.Tag, width: int, height: int) - icon.attrs["width"] = "63%" icon.attrs["height"] = "63%" icon.attrs["preserveAspectRatio"] = "xMidYMid meet" - icon.attrs["x"] = width * 0.37 / 2 - icon.attrs["y"] = height * 0.37 / 2 + icon.attrs["x"] = str(width * 0.37 / 2) + icon.attrs["y"] = str(height * 0.37 / 2) doc = bs4.BeautifulSoup(f"""