MCPcopy Index your code
hub / github.com/WhyNotHugo/python-barcode / _try_to_optimize

Method _try_to_optimize

barcode/codex.py:244–247  ·  view source on GitHub ↗
(self, encoded: list[int])

Source from the content-addressed store, hash-verified

242 )
243
244 def _try_to_optimize(self, encoded: list[int]) -> list[int]:
245 if encoded[1] in code128.TO:
246 encoded[:2] = [code128.TO[encoded[1]]]
247 return encoded
248
249 def _calculate_checksum(self, encoded: list[int]) -> int:
250 cs = [encoded[0]]

Callers 1

_buildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected