Closed fra87 closed 11 months ago
Apologies, I missed your PR earlier.
I had written a fix for this same issue (https://github.com/WhyNotHugo/python-barcode/pull/215), but yours is a lot simpler, so I've merged your approach but kept the tests from my PR.
The EAN checksum calculation is correct only if the
self.ean
variable does not have the checksum value already present. This may not be true in some cases (e.g. someone trying to compare an already present checksum with the library-generated one)