Fixed static typing omissions in Python code.

pull/123/head
Project Nayuki 3 years ago
parent 4d13c303dc
commit 233b4ee331

@ -24,6 +24,7 @@
# Software.
#
from typing import List
from qrcodegen import QrCode, QrSegment

@ -817,7 +817,7 @@ class QrSegment:
# Package-private function
@staticmethod
def get_total_bits(segs, version: int) -> Optional[int]:
def get_total_bits(segs: Sequence[QrSegment], version: int) -> Optional[int]:
"""Calculates the number of bits needed to encode the given segments at
the given version. Returns a non-negative number if successful. Otherwise
returns None if a segment has too many characters to fit its length field."""

Loading…
Cancel
Save