Skip to content

Commit 0ad4e5b

Browse files
committed
Assert type
Works around mypy warning; this should always be true anyway.
1 parent 7ca31f1 commit 0ad4e5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

barcode/writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ def _init(self, code: list[str]):
331331
line = code[0]
332332
width, height = self.calculate_size(len(line), 1)
333333
self._document = create_svg_object(self.with_doctype)
334+
assert self._document.documentElement is not None
334335
self._root = self._document.documentElement
335336
attributes = {
336337
"width": SIZE.format(width),

0 commit comments

Comments
 (0)