Skip to content

Commit 755b31f

Browse files
committed
Use tag directly, no need to detour
1 parent db445e5 commit 755b31f

File tree

1 file changed

+2
-4
lines changed
  • qrcode/image/styles/moduledrawers

1 file changed

+2
-4
lines changed

qrcode/image/styles/moduledrawers/svg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class SvgQRModuleDrawer(BaseSvgQRModuleDrawer):
5353

5454
def initialize(self, *args, **kwargs) -> None:
5555
super().initialize(*args, **kwargs)
56-
# Use tag directly instead of QName with namespace to avoid svg: prefix in output
57-
self.tag_qname = self.tag
5856

5957
def drawrect(self, box, is_active: bool):
6058
if not is_active:
@@ -73,7 +71,7 @@ def initialize(self, *args, **kwargs) -> None:
7371
def el(self, box):
7472
coords = self.coords(box)
7573
return ET.Element(
76-
self.tag_qname,
74+
self.tag,
7775
x=self.img.units(coords.x0),
7876
y=self.img.units(coords.y0),
7977
width=self.unit_size,
@@ -91,7 +89,7 @@ def initialize(self, *args, **kwargs) -> None:
9189
def el(self, box):
9290
coords = self.coords(box)
9391
return ET.Element(
94-
self.tag_qname,
92+
self.tag,
9593
cx=self.img.units(coords.xh),
9694
cy=self.img.units(coords.yh),
9795
r=self.radius,

0 commit comments

Comments
 (0)