MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / _svg

Method _svg

qrcode/image/svg.py:61–71  ·  view source on GitHub ↗
(self, tag=None, version="1.1", **kwargs)

Source from the content-addressed store, hash-verified

59 return self._svg(**kwargs)
60
61 def _svg(self, tag=None, version="1.1", **kwargs):
62 if tag is None:
63 tag = ET.QName(self._SVG_namespace, "svg")
64 dimension = self.units(self.pixel_size)
65 return ET.Element(
66 tag, # type: ignore
67 width=dimension,
68 height=dimension,
69 version=version,
70 **kwargs,
71 )
72
73 def _write(self, stream):
74 ET.ElementTree(self._img).write(stream, xml_declaration=False)

Callers 1

new_imageMethod · 0.95

Calls 1

unitsMethod · 0.95

Tested by

no test coverage detected